Commit Graph

820 Commits

Author SHA1 Message Date
Jordan Rose
c38fcc1e96 [Driver] Expose -emit-parseable-module-interface[-path]
Commit to a command line option spelling so that build systems can
start testing it. I deliberately picked one of the longer names we
were considering because we can always decide to add a shorter alias,
but can't decide a shorter name was too generic.

Like the other supplementary output flags,
-emit-parseable-module-interface-path will emit a .swiftinterface file
to a particular path, while -emit-parseable-module-interface will put
it next to the main output (the one specified with -o).

rdar://problem/43776945
2018-10-04 17:50:04 -07:00
Mike Ash
5f17b450c3 [Stdlib] Make all the functions in LibcShims.h either INTERNAL or inline. Move LibcShimsInline.h to LibcOverlayShims.h for more consistent naming. Fix up several tests that needed the mock Darwin overlay built. Fix one SourceKit test that no longer produces is_system: 1 on an import Darwin line. 2018-10-03 09:55:34 -04:00
Tony Allevato
0f8a765baa Add response file support for more Swift jobs. (#19449)
This enables response files for any jobs that invoke `swift` or another
toolchain tool that goes through the same driver code path, like
`swift-autolink-extract`.
2018-09-24 14:54:51 -07:00
Jordan Rose
c3f117c9ce [test] Fix Driver tests not to write to PWD (a shared directory) (#19406)
Hopefully fixes some of the weird failures we're seeing in
rdar://problem/42247881, though I'm not sure how it would be
responsible for some of them.
2018-09-20 15:27:48 -07:00
David Ungar
25442df50a Use %target-build-swift and -parse. 2018-09-14 10:16:57 -07:00
David Ungar
c80bf5aece remove extra newlines at end. 2018-09-14 09:40:23 -07:00
David Ungar
b191063ed0 add test 2018-09-14 09:35:13 -07:00
David Ungar
e44d8a9dfb Add -driver-force-response-files to enable testing. 2018-09-13 21:57:11 -07:00
Jordan Rose
b9af6e0110 [SIL] Honor #sourceLocation in optimization record YAML files
Previously, we were using the physical buffer name but the virtual
line number, which is bogus.
2018-08-29 11:46:41 -07:00
Jordan Rose
845e8bef5f [Driver] Add -experimental-emit-interface for textual interfaces
This will eventually become plain old -emit-interface, but we don't
want people to be using it just yet. This is just for testing.
2018-08-24 18:02:48 -07:00
Arnold Schwaighofer
d256564e89 Codesign test/Driver 2018-08-10 08:36:44 -07:00
Jordan Rose
634cf7e4a0 Merge pull request #18266 from keith/ks/linker-order
Unify linker argument order across platforms
2018-08-06 08:36:53 -07:00
Robert Widmann
3defe3b7a9 Refine The Frontend's Understanding of SwiftOnoneSupport
Continuing work from #18344, be more conservative about when we load
SwiftOnoneSupport.  Specifically, -emit-silgen and -emit-sibgen, despite
not going through the SIL Optimizer, may silently introduce dependencies
on SwiftOnoneSupport.

Because we want to support the ability to posthumously compile SILGen
and SIBGen'd files with these implicit dependencies, and because SIL
is not yet capable of expressing the dependency itself, we must always
assume we need to load SwiftOnoneSupport.
2018-07-31 17:25:39 -07:00
Keith Smiley
7f3804683b Add warning for bitcode marker without object (#18304)
Previously if you passed `-embed-bitcode-marker` to a command that
wasn't producing an object file, it would silently be ignored. This
change puts it inline with `-embed-bitcode` in this same case, which
generates a warning.
2018-07-30 11:24:09 -07:00
Keith Smiley
14f0241662 Add tests for -L vs -Xlinker order 2018-07-30 10:05:52 -07:00
Keith Smiley
1f4e643d42 Move linker arguments to the end 2018-07-27 14:34:00 -07:00
Jordan Rose
ae6645d808 [test] Move a slow Driver test to the validation suite (#18261) 2018-07-26 17:53:43 -07:00
Keith Smiley
577b18f86d Unify linker argument order across platforms
Previously extra linker arguments had different behavior on darwin vs
other unix platforms. On darwin the arguments passed with -Xlinker would
be passed to the linker before the default arguments, where as with the
default unix toolchain they would be passed afterwards.

There isn't really a great option for which order these should be in.
If you want to have a custom rpath that takes precedence over the
default rpaths, you want them to be passed before, but if you want to
negate a default argument you want them to come after.

This change unifies the behavior so at least you always get the same
behavior across platforms.
2018-07-26 13:37:09 -07:00
Jordan Rose
c2f9a2ae5d [test] Provide an explicit TMPDIR for Driver/sdk-link.swift (#18207)
And change a not-testing-anything-new frontend invocation into an
only-slightly-more-useful driver invocation.

This shouldn't really affect anything, but we've seen this test fail
spuriously for a long time. Maybe this fix'll stick.

rdar://problem/42247881
2018-07-24 19:36:36 -07:00
Jordan Rose
de30596ccd Merge pull request #17665 from allevato/debug-prefix-map-wip
Implement -debug-prefix-map flag.
2018-07-24 17:34:42 -07:00
Jordan Rose
a39afdc778 Merge pull request #18090 from jrose-apple/emit-interface-path
[Frontend] Add a new -emit-interface-path option
2018-07-24 12:49:27 -07:00
Jordan Rose
79928ad5f2 Make sure we handle a supplementary output list with no outputs in it (#18117) 2018-07-20 17:19:45 -07:00
Jordan Rose
d176bfa9ce [test] Move tests that only test the Frontend out of Driver/
Reorganization only.
2018-07-19 15:56:55 -07:00
Jordan Rose
b88256e7ac [test] Split out the Frontend parts of test/Driver/options.swift
This dates back to the early days when the Driver was still being
brought up, but there's no reason to put them together now.

Reorganization and elimination of redundancy only.
2018-07-19 15:56:55 -07:00
Robert Widmann
667b53cb75 Merge pull request #17874 from ahti/missing-python-substitution
add missing python substitution in test
2018-07-19 11:57:10 -07:00
Jordan Rose
6f42fcc8c4 Merge pull request #18060 from jrose-apple/and-you-get-a-class_getImageName
[runtime] Backwards-deployment support for class_getImageName

https://bugs.swift.org/browse/SR-1917
rdar://problem/41535552
2018-07-19 08:36:23 -07:00
Jordan Rose
e9f71fd61c [Driver] We don't need arclite on pre-10.14 after all
Reverts the effects of df974b2190, but keeps the refactoring and nicer
tests.
2018-07-18 18:28:12 -07:00
Jordan Rose
387bbac192 [test] Tweak test to not check for any warnings at all
09b043c789 didn't do the trick, probably because some of the text is
going to stdout and some to stderr. Just don't check for warnings at
all in this test, at least for now.

rdar://problem/42271414, again.
2018-07-18 17:46:51 -07:00
swift-ci
03e391db1e Merge pull request #18011 from jrose-apple/there-aint-nothing-to-see-here 2018-07-17 12:21:30 -07:00
Jordan Rose
09b043c789 [test] Tweak test to allow for warnings from ld, if there are any
There probably /shouldn't/ be, but it isn't this test's responsibility
to catch them.

rdar://problem/42271414
2018-07-17 10:27:09 -07:00
Jordan Rose
959eb339ae [test] Add -v to a test that spuriously failed an Apple-internal bot
Hoping to find some answers. Tracked in rdar://problem/42247881.
2018-07-16 11:37:36 -07:00
Jordan Rose
851c0e0883 Merge pull request #16458 from dabelknap/verbose_linker
Run clang++ in verbose mode during linking if swiftc is called with "-v"
2018-07-16 09:16:22 -07:00
Austin Belknap
a93ed0ea70 Fix typo. 2018-07-13 18:14:40 -07:00
Austin Belknap
3be298a3fa Test that clang++ gets called with the verbose option. 2018-07-13 15:41:25 -07:00
Robert Widmann
2ee7e7c59b -parse and -resolve-imports cannot emit ObjC headers
At least -typecheck is required to be able to emit headers.
2018-07-13 14:56:52 -07:00
Robert Widmann
2282065197 Rename "Name Binding" action to "Resolve Imports" 2018-07-13 11:00:48 -07:00
Robert Widmann
c440b0ba5a Diagnose parse-only invocations trying to emit dependency information
Parse-only invocations do not support the proper creation of dependency files or reference dependency files because they have not yet run name binding.  Ban these invocations by diagnostic and add a new diagnostic specifically for reference dependencies.
2018-07-13 10:56:03 -07:00
Jordan Rose
df974b2190 [Driver] Always link arclite when deploying earlier than macOS 10.14
For the upcoming hook in the ObjC runtime for class_getImageName
(see previous commit).
2018-07-12 15:48:58 -07:00
Jordan Rose
51f6e9a7c4 [test] Tidy up newly-added clang_rt Driver tests to be a bit clearer
Per feedback from David U.
2018-07-11 15:09:53 -07:00
Lukas Stabe
ce3bacc670 add missing python substitution in test 2018-07-11 01:00:52 +00:00
Jordan Rose
d4668833e0 [Driver] Only link to compiler_rt if present for the target platform
Tweak the tests to check this correctly.
2018-07-10 12:45:59 -07:00
Jordan Rose
64b3d88d93 [Driver] Always link compiler_rt on Darwin
Turns out it's needed for normal builtins that can appear in inlinable
functions, including Objective-C's @available. Clang always links it
unconditionally, so so should Swift.

Note that this does mean you have to build compiler_rt to get a
successful test run on Apple platforms. That was always true if you
wanted the sanitizer tests to work, though.

rdar://problem/41911599
2018-07-09 13:42:02 -07:00
Neil Jones
a02363737e Add back frontend command check 2018-07-06 12:45:44 +09:00
Neil Jones
ec3668e81a Remove x86_64 target check.
Fix for [SR-7321]
Check for x86_64 machine causes test failure on non x86_64 machines such as AArch64.
2018-07-05 08:36:35 +09:00
Tony Allevato
78edd30ddf Implement -debug-prefix-map flag.
This flag is based on Clang's -fdebug-prefix-map, which lets the user remap absolute paths in debug info. This is necessary for reproducible builds and allows debugging to work on a different machine than the one that built the code when paths to the source may be different.
2018-07-01 18:22:15 -07:00
Huon Wilson
db476ba5cd [Driver] Completely remove -emit-public-type-metadata-accessors.
This was retained to help ease migration between versions of the 4.2 compiler
between when the flag was originally introduced and the full fix landed. It's
not longer needed and there's no reason to retain it in the full release.

Fixes rdar://problem/40502379.
2018-06-22 11:31:27 +10:00
Jordan Rose
7d8e40b0bb Merge pull request #16362 from dabelknap/frontend_responsefile
Wrap Command Line Arguments in a Response File if System Limits are Exceeded

https://bugs.swift.org/browse/SR-4517
2018-06-21 16:31:20 -07:00
Ellis Hoag
c93a5a5776 Add -debug-info-format=[dwarf|codeview] option (#16888) 2018-06-20 09:52:57 -07:00
swift-ci
8f23048c85 Merge pull request #17097 from brentdax/noescape-from-the-ast-dump-scrape 2018-06-18 16:59:37 -07:00
swift-ci
e5ffbbe3de Merge pull request #17228 from graydon/rdar-40526328-emit-SIGINT-for-cancelled-batch-constituents-testcase 2018-06-14 20:12:57 -07:00