Commit Graph

142 Commits

Author SHA1 Message Date
Graydon Hoare
7953d59571 Factor out toolchains::Darwin::addDeploymentTargetArgs. 2019-08-02 13:33:36 -07:00
Graydon Hoare
7cc1b135e3 Factor out toolchains::Darwin::addArgsToLinkARCLite. 2019-08-02 13:33:32 -07:00
Jordan Rose
05903b593c Factor out toolchains::Darwin::addArgsToLinkStdlib. 2019-08-02 13:28:37 -07:00
Jordan Rose
2765011353 <rdar://43616773> Modify toolchains::Darwin linking logic to account for Swift-in-the-OS.
Manual re-application of a patch by Graydon Hoare.
2019-08-02 13:27:02 -07:00
Luciano Almeida
3bcc072cfe Changing diagnose from error to warning, updating message and tests 2019-07-22 20:58:19 -03:00
Luciano Almeida
0d8da23336 Diagnose libarclite not found on darwing toolchain 2019-07-21 22:27:05 -03:00
Luciano Almeida
874f53daf1 Fixing spacing. 2019-07-19 19:21:09 -03:00
Luciano Almeida
1f3781ccb4 Identation. 2019-07-18 23:22:18 -03:00
Luciano Almeida
ba597a02b9 Refactoring validate Deployment targets to darwing toolchain validation 2019-07-18 23:20:58 -03:00
Luciano Almeida
ed432ac302 Missing forward 2019-07-15 22:56:56 -03:00
Luciano Almeida
7e9516a7fe Fixing nits and unused code. 2019-07-15 22:29:37 -03:00
Luciano Almeida
83ede1f3cc Forward declaring and improvement on warning. 2019-07-15 22:20:00 -03:00
Luciano Almeida
217887ae91 Fixing nitpicks. 2019-07-15 22:12:51 -03:00
Luciano Almeida
c95f28c9dc Moving -static-stdlib validation to Darwin toolchain. 2019-07-15 21:02:39 -03:00
Luciano Almeida
1983e15ef2 Validate -static-stdlib on Driver::validate args and removing handles on Darwing toolchain 2019-07-14 22:22:13 -03:00
Brent Royal-Gordon
1e81ced48d Revert "Revert "Look up runtime libraries in SDK"" 2019-07-03 14:18:48 -07:00
Xi Ge
fdd41aeb68 Revert "Look up runtime libraries in SDK (#25740)"
This reverts commit b818b441f2.
2019-06-25 17:48:41 -07:00
Brent Royal-Gordon
b818b441f2 Look up runtime libraries in SDK (#25740)
In #23175, we started looking in the SDK for swiftmodules, but we want to look for the dylibs there too. Fixes <rdar://problem/52059706>.
2019-06-25 15:39:03 -07:00
Jordan Rose
543632deda Merge pull request #25202 from troughton/static-libraries-driver
[Driver] Add -static flag for generating static archives
2019-06-20 09:10:02 -07:00
Arnold Schwaighofer
a9c83e73ed Fix swiftpm targets without swift
SwiftPM will pass a -runtime-compatibility-version none in this case.
2019-06-18 03:37:43 -07:00
Arnold Schwaighofer
443719d033 Fix invalid deref 2019-06-18 01:00:03 -07:00
Arnold Schwaighofer
d76c8147a0 Fix swiftpm build 2019-06-17 19:47:39 -07:00
Thomas Roughton
e5ea42d774 Driver: renamic LinkJob to DynamicLinkJob and ArchiveJob to StaticLinkJob
# Conflicts:
#	lib/Driver/DarwinToolChains.cpp
2019-06-17 12:49:17 +12:00
Thomas Roughton
b34a1cbbc6 Driver: add -static flag for generating static archives 2019-06-17 12:49:03 +12: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
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
Rahul Malik
d3cc043e58 Add Undefined Behavior sanitizer to Swift Driver (#18553)
This change allows the swift driver to link the ubsan runtime if
`-sanitize=undefined` is specified.
This is useful for sanitizing linked Objective-C code.
2018-11-13 12:11:56 -08:00
Jordan Rose
e224e31720 Break almost all dependencies of Driver on Frontend
- Sink OutputFileMap{.h,.cpp} and ReferenceDependencyKeys.h to Basic
- Remove unnecessary includes of Frontend.h.
2018-08-27 20:47:58 -07:00
Keith Smiley
ab5588da05 Reorder Xlinker and linker option group 2018-07-30 09:30:12 -07:00
Keith Smiley
1f4e643d42 Move linker arguments to the end 2018-07-27 14:34:00 -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
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
d11704bcc9 Add swift::getNonSimulatorPlatform for DarwinPlatformKind
And use it in getDarwinLibraryNameSuffixForTriple, making the logic
there clearer.

Suggested by David U!
2018-07-11 15:09:53 -07: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
Tony Allevato
0acc73ae4c Update flag name to -debug-info-store-invocation. 2018-06-12 18:32:35 -07:00
Tony Allevato
22ac700154 Make DWARF debug flag behavior match Clang.
Only write the compilation flags to debug info for Mach-O targets, and only
if the RC_DEBUG_OPTIONS environment variable is set.
2018-06-09 20:05:06 -07:00
Benjamin Herzog
ac10fb3462 [Driver] Added process information to emitted messages
When providing the -parseable-output flag to the swift compiler, it will provide json formatted messages about tasks that run.
I added some optional usage information in form of user time, system time and maxrss to the output. This can be used by other tools using the compiler to get some insights about time and memory usage.
Since the output does not longer match processes run (in batch mode), I also added a real_pid field so the client could reason about jobs that belong together if needed.

rdar://39798231
2018-05-25 13:12:57 -07:00
Thomas Roughton
0506ccc244 Refactor ToolChains into separate files. (#16091)
Format the code and factor together some common functionality at the same time.
2018-05-02 11:11:54 -07:00