Commit Graph

1784 Commits

Author SHA1 Message Date
Luciano Almeida
53917874dd Adding todo. 2019-07-15 22:35:51 -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
Harlan Haskins
21bd24a150 Revert "[Driver] Load the standard library before starting parallel frontend invocations"
This failed the source compat suite, it seems we need more driver
changes for this.
2019-07-12 21:38:23 -07:00
Harlan Haskins
7022110a05 [Driver] Load the standard library before starting parallel frontend invocations
Add a new action, LoadModuleJobAction, that the driver can use to schedule a
load of a given module before we fan out and invoke the frontend multiple
times. This gives the module interface loader a chance to compile it from a
module interface before we start with parallel invocations, avoiding starting
potentially dozens of redundant compiles of a large module. Start by using this
on the standard library.

Quick fix for rdar://52839445
2019-07-12 14:53:25 -07:00
Saleem Abdulrasool
e96e7cc190 Driver: look for the runtime object in the SDK
The runtime object is for the host, and is part of the SDK.  If `-sdk`
is passed, look for the runtime support object relative to the SDK root.
2019-07-09 14:56:42 -07:00
pschuh
4fd0671e54 Merge pull request #25870 from pschuh/cpp-1
Add -enable-cxx-interop flag and support for extern "C" {}
2019-07-09 11:37:31 -07:00
Jordan Rose
3f0e69ff8e Merge pull request #25992 from broadwaylamb/no-color-diagnostics
[Driver] Implement -no-color-diagnostics flag
2019-07-09 10:42:29 -07:00
Sergej Jaskiewicz
0ac6f3a3ad [Driver] Automatic -color-diagnostics flag is added *before* -Xfrontend 2019-07-09 15:53:35 +03:00
Parker Schuh
fa69a73ee4 Add -enable-cxx-interop flag and support for extern "C" {} 2019-07-08 11:43:35 -07:00
Sergej Jaskiewicz
0ed3bb1e17 [Driver] Implement -no-color-diagnostics flag 2019-07-08 04:22:06 +03:00
Brent Royal-Gordon
1e81ced48d Revert "Revert "Look up runtime libraries in SDK"" 2019-07-03 14:18:48 -07:00
Saleem Abdulrasool
c113db2a8e Merge pull request #25887 from compnerd/tell-me-whats-wrong
Driver: emit a diagnostic if `clang++` is not found
2019-07-02 15:28:59 -07:00
Saleem Abdulrasool
133e1f2c14 Driver: emit a diagnostic if clang++ is not found
Rather than aborting due to an assertion failure, emit a diagnostic.
This is much safer and generally easier to understand why the command
failed.  It solves the problem of running swiftc from the build without
the path being set such that the clang++ driver is found by the swift
driver.
2019-07-02 10:20:54 -07:00
Aasim Kandrikar
6328322eea [Driver] Add warning when using -F and path ends in ".framework"
This commit also includes cases where user uses -Fsystem and when path
ends in ".framework/"

(cherry picked from commit a5d9750a9d25441517f3bec97488f57d1bb4b03f)
2019-07-01 22:14:14 +05:30
Saleem Abdulrasool
b3f0ba9d83 Driver: honour -use-ld on Windows static links
The librarian on Windows is a part of the linker.  Enabling `-use-ld=`
for driver for static linking on Windows enables the user to override
the linker.  This is particularly important for cross-linking Windows
from Linux where link.exe is not present as it is a part of the MSVC
toolset.
2019-06-29 20:50:56 -07:00
Saleem Abdulrasool
946587c61b Merge pull request #25850 from compnerd/silence
Driver: silence linker logo
2019-06-28 08:32:30 -07:00
Saleem Abdulrasool
aee0b0b23a Driver: silence linker logo
Adjust the librarian invocation to avoid the unnecessary logo printing.
This is needed to generate static libraries with Swift.
2019-06-27 22:46:43 -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
David Ungar
3a3145c0f4 Alternate SelfDC computation, fixes, and cleanups.
ASTScopeLookup by default
Create empty fn bodies for IDE tests.
Include initializer source range for property wrappers.
Add -disable-astscope-lookup
2019-06-23 09:17:09 -07:00
swift-ci
bb2e003a21 Merge pull request #25628 from akyrtzi/index-disable-typo-correction 2019-06-20 09:38:37 -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
Argyrios Kyrtzidis
e23d3e3fbb [driver] For -index-file mode add -disable-typo-correction
We don't need typo-correction for that since the errors will be ignored and it can be expensive to do typo-correction.
2019-06-20 08:22:15 -07:00
Jordan Rose
04f74b8710 [Driver] Remove default from fully-covered switch (#25548)
This produces warnings when compiling with Clang.
2019-06-18 09:23:21 -07:00
Arnold Schwaighofer
85bfbe2dd3 Merge pull request #25473 from aschwaighofer/back_deploy_dynamic_replacement
stdlib: Add backward deployment versions for the dynamic-replacement runtime functions
2019-06-18 09:02:22 -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
05a6299b7b Another review comment I missed 2019-06-17 19:51:44 -07:00
Arnold Schwaighofer
d76c8147a0 Fix swiftpm build 2019-06-17 19:47:39 -07:00
Arnold Schwaighofer
5d329464d6 Use thread private key to avoid weak linkage
We use one bit of the third reserved swift private tls key.

Also move the functionality into a separate static archive that is
always linked dependent on deployment target.
2019-06-17 15:03:45 -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
Jordan Rose
6b87e97ca1 [Driver] Bump the required Apple SDK versions to the 2019 OSs (#25469)
rdar://problem/50779459
2019-06-14 11:48:50 -07:00
David Ungar
06527db4ab Merge pull request #24594 from davidungar/A5-7-ASTOOScope-rebased
[NameLookup] ASTOOScope ontology
2019-06-14 08:03:09 -07:00
David Ungar
6cfcabd8e5 add -disable-parser-lookup 2019-06-11 09:08:10 -07:00
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
David Ungar
663760e3b7 ASTOOScope ontology 2019-05-28 10:48:22 -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