Commit Graph

994 Commits

Author SHA1 Message Date
Kelly Hutchison 78802be3e0 SR-20 Update swift --help to explain multitool support ("swift build", etc.) 2019-06-07 17:51:14 -07:00
Joe Groff 4ed8de10f9 Revert "Revert "Use autolinking to pull in compatibility libraries."" 2019-06-03 20:10:51 -07:00
Joe Groff a7cc3a38cc Revert "Use autolinking to pull in compatibility libraries." 2019-06-03 14:18:39 -07:00
Joe Groff dffd1b27a1 Use autolinking to pull in compatibility libraries.
Many build systems that support Swift don't use swiftc to drive the linker. To make things
easier for these build systems, also use autolinking to pull in the needed compatibility
libraries. This is less ideal than letting the driver add it at link time, since individual
compile jobs don't know whether they're building an executable or not. Introduce a
`-disable-autolink-runtime-compatibility` flag, which build systems that do drive the linker
with swiftc can pass to avoid autolinking.

rdar://problem/50057445
2019-05-31 13:11:14 -07:00
Joe Groff 2a2d40d870 Driver: Link against compatibility library for deploying back to Swift 5.0 runtimes 2019-05-24 12:44:22 -07:00
Saleem Abdulrasool 7514adf66a Driver: introduce new -libc option for Windows
On Windows, there are multiple variants of the C runtime that must be
explicitly specified and consistently used from the runtime to the
application.  The new `-libc` option allows us to control the linking
phase by correctly embedding the requested library to be linked.  It is
made into a required parameter on Windows and will add in the
appropriate flags for the imported C headers as well.  This ensures that
the C library is not incorrectly linked.
2019-05-16 21:01:47 -07:00
Jordan Rose 5191b036f2 Merge pull request #24008 from allevato/batch-mode-response-files
Fix response file support for batch jobs.
2019-05-16 08:18:18 -07:00
Saleem Abdulrasool 4341a7bda6 Driver: use -Xlinker rather than -Wl (NFC)
This is just nicer to read and makes the option standout better.  NFC.
2019-05-15 16:21:33 -07:00
Alex Langford 3d9a28925b [CMake] Modify swift_install_in_component to support cmake install components
CMake supports the notion of installation components. Right now we have some
custom code for supporting swift components. I think that for installation
purposes, it would be nice to use the CMake component system.

This should be a non-functional change. We should still only be generating
install rules for targets and files in components we want to install, and we
still use the install ninja target to install everything.
2019-04-19 14:06:11 -07:00
Tony Allevato 6d7223023d Fix response file support for batch jobs. 2019-04-13 10:06:30 -07:00
Harlan Haskins ea7e7e918f [ModuleInterface] Remove 'parseable interface' from diagnostics
Part of rdar://49359734
2019-04-11 18:05:09 -07:00
Harlan Haskins e5456984f7 [ModuleInterfaces] Remove 'parseable' from command-line flags
Leave the old flag in as an alias to the new flag, for transition
purposes. Also go ahead and remove the long-deprecated and unused
`emit-interface-path`.

Part of rdar://49359734
2019-04-11 18:05:09 -07:00
Michael Gottesman 91dbbc3088 Merge pull request #23204 from compnerd/silence-in-the-library
Remove custom handling in add_swift_host_library
2019-04-08 10:49:42 -07:00
Julian Lettner da453618b4 Merge pull request #23645 from apple/driver-tsan-linux-linker-flags
[Driver] TSan runtime now has a link-time dependency on libdispatch
2019-04-01 15:20:05 -07:00
Jason Mittertreiner 8998235ed6 Enable Child Memory Usage Tracking on Windows (#23686)
Windows requires a handle to get memory usage, so do a slight refactor
to collect the child's memory usage as it exits instead of as the parent
is cleaning up.
2019-03-30 18:54:30 -07:00
Julian Lettner 1cac0bedf1 [Driver] TSan runtime now has a link-time dependency on libdispatch
Previously, the TSan runtime only required libdispatch on Darwin, which
required no explicit linker flags, because libdispatch is always
provided by the system (libSystem).

Now, the TSan runtime also has a link-time dependency on libdispatch on
Linux, where libdispatch (and the blocks runtime) is just another
library. We therefore need to specify them as additonal linker options.
2019-03-28 17:53:49 -07:00
Julian Lettner e24585dc17 [Driver] Delegate linking of sanitizer runtimes to underlying Clang
For Unix tool chains.
2019-03-26 10:56:52 -07:00
Saleem Abdulrasool 1cb57b6fc2 Driver: perform the ModuleWrap job for COFF
The ModuleWrap job is responsible for wrapping the AST into the swift
module.  It was only enabled for ELF objects, but COFF needs this
operation to be performed as well.  Enable this for the COFF targets as
well.  This is needed to fix the DebugInfo AST Section verification.
2019-03-22 12:45:50 -07:00
Jordan Rose 22f9853b76 [ParseableInterface] Turn on -enable-parseable-module-interface always (#23331)
...and remove the option. This is ~technically~ CLI-breaking because
Swift 5 shipped this as a hidden driver option, but it wouldn't have
/done/ anything in Swift 5, so I think it's okay to remove.

Note that if a parseable interface (.swiftinterface) and a binary
interface (.swiftmodule) are both present, the binary one will still
be preferred. This just /allows/ parseable interfaces to be used.

rdar://problem/36885834
2019-03-16 15:31:11 -07:00
Slava Pestov 1159af50d9 Rename -enable-resilience to -enable-library-evolution and make it a driver flag
Fixes <rdar://problem/47679085>.
2019-03-14 22:24:26 -04:00
Saleem Abdulrasool f9df4cad97 build: remove DEPENDS from add_swift_host_library
Use the appropriate CMake mechanisms for building the libraries.
2019-03-10 17:01:27 -07:00
Jordan Rose e76b5a847c [Driver] Always fall back to an arclite in the Xcode default toolchain (#22911)
...instead of the current toolchain, which we would have just
searched by looking relative to the swiftc binary.

rdar://problem/48044350
2019-02-26 08:41:03 -08:00
Saleem Abdulrasool 9934532e07 cmake: switch host libraries to use target_link_libraries
This is a follow up to the discussion on #22740 to switch the host
libraries to use the `target_link_libraries` rather than the
`LINK_LIBRARIES` special handling.  This allows the dependency to be
properly tracked by CMake and allows us to use the more modern syntax.
2019-02-22 15:28:07 -08:00
Jason Mittertreiner 9eeabc9875 Allow Arguments in -driver-use-frontend-path (#22596)
Windows doesn't know what a shebang is, so it's unable to run tests that
use -driver-use-frontend-path with a script. This allows the script
interpreter to be run as the executable with the script as its first
argument. e.g. --driver-use-frontend-path "python;my-script.py"
2019-02-20 11:20:21 -08:00
David Ungar 520b801bf0 Merge pull request #21177 from davidungar/A-exp-dep-graph-12-10-18
First cut at graph-based fine-grained experimental dependencies.
2019-02-03 21:15:17 -08:00
David Ungar 76629f1307 Format 2019-01-30 17:21:44 -08:00
David Ungar b82694c307 Format 2019-01-30 17:19:56 -08:00
David Ungar 2f65ac3735 Cosmetic cleanups 2019-01-30 17:16:49 -08:00
David Ungar 4bd712731c Edge fix 2019-01-28 17:14:05 -08:00
David Ungar 1fa76b97da Rm debugging code 2019-01-28 15:59:55 -08:00
David Ungar 14ba2a1b60 Format 2019-01-28 15:56:18 -08:00
David Ungar fc4b7963ee 1st rough cut, frontend tracks defs not uses 2019-01-28 15:32:47 -08:00
David Ungar 2514383fc8 1st untested unfmt cut at more specific usesByDef including integration redo 2019-01-28 13:08:37 -08:00
David Ungar ba768175f1 checkpoint usesByDef 2019-01-28 11:10:04 -08:00
David Ungar 626831c568 The fix? 2019-01-28 10:19:28 -08:00
David Ungar 8275de7cd7 Clean up with out fix yet, unfmt. 2019-01-28 10:19:06 -08:00
David Ungar afe428a5bf untested, unformatted tracing cleanup 2019-01-28 09:40:29 -08:00
David Ungar bb4239b49a rm most dbg code 2019-01-27 19:15:50 -08:00
David Ungar ae46aa918a Various fixes + debug unfmt 2019-01-27 19:12:59 -08:00
David Ungar 89f77175d0 Format 2019-01-27 09:15:25 -08:00
David Ungar 3d8779efba Fix print bugs unfmt 2019-01-26 21:47:52 -08:00
David Ungar 1c3e2fc872 Format 2019-01-26 18:52:28 -08:00
David Ungar e912642304 1st cut dependency tracing 2019-01-26 18:50:41 -08:00
David Ungar 93db5f44ef wip 2019-01-26 09:46:12 -08:00
David Ungar 9d84bc2af1 WIP tracer 2019-01-26 09:36:40 -08:00
Ding Ye ba2157bbee [Driver] Accept -serialize-diagnostics-path for the interpret mode. (#22113)
This patch allows `-serialize-diagnostics-path` for the interpret mode.
There is one file compiled in such mode, so it makes sense to support
this flag to specify an explicit output path for diagnostics emission.

Resolves: SR-9670
2019-01-25 17:20:32 -08:00
David Ungar 323c42c532 Fomat 2019-01-24 18:46:49 -08:00
David Ungar b520b242dc Collapsed lots of changes. 2019-01-24 18:46:49 -08:00
Doug Gregor 580c992aa1 [Driver] -g implies -enable-anonymous-context-mangled-names.
Including the mangled names in anonymous context metadata can bloat
code size, and is not needed for normal runtime resolution. However,
it aids debugging, so have -g implies the emission of this extra
metadata, which is always optional.
2019-01-22 10:22:23 -08:00
Ankit Aggarwal 45290837b4 Merge pull request #21110 from aciidb0mb3r/swiftpm-manifest-version
Extend @available to support PackageDescription
2019-01-07 12:20:23 -08:00