Saleem Abdulrasool
551a2a58a5
Driver: normalise linker triple on all android targets
...
Currently we only support building for android armv7, arm64, x86,
x86_64. In the future, if support for MIPS and MIPS64 is added, we
should normalise those as well. This is needed to support compilation
against modern NDKs.
2019-08-04 19:48:57 -07:00
Jordan Rose
87b7ee1bc0
Tweak Swift-in-OS check to account for linker limitations
...
The backwards-deployment install name trickery we're using doesn't
handle "patch" components in version numbers, so we still need to
provide an rpath even when deploying to macOS 10.14.4.
2019-08-02 13:33:36 -07:00
Graydon Hoare
fa244b2334
Factor out toolchains::Darwin::addLinkerInputArgs.
2019-08-02 13:33:36 -07:00
Jordan Rose
7fb43af6e5
Factor out toolchains::Darwin::addSanitizerArgs.
2019-08-02 13:33:36 -07:00
Graydon Hoare
71dd7417be
Factor out toolchains::Darwin::addProfileGenerationArgs.
2019-08-02 13:33:36 -07:00
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
swift-ci
c4c240d3e7
Merge pull request #26261 from LucianoPAlmeida/fixme-diagnose-darwin-toolchain-arclib
2019-08-02 11:53:28 -07:00
Argyrios Kyrtzidis
348fa2145e
Merge pull request #26371 from akyrtzi/swift-indent
...
Rename the `swift-format` utility to `swift-indent`
2019-07-26 15:19:36 -07:00
Argyrios Kyrtzidis
0135e01d02
Rename the swift-format utility to swift-indent
...
This is to distinguish the C++ indenting functionality from the new formatter that is written in Swift.
2019-07-26 11:40:54 -07:00
Saleem Abdulrasool
f82572a573
Merge pull request #25990 from compnerd/one-sdk-to-rule-them-all
...
Driver: look for the runtime object in the SDK
2019-07-25 15:32:51 -07:00
Saleem Abdulrasool
67475dced4
Driver: avoid linking against the C++ runtime
...
Use `clang` rather than `clang++` as the linker driver. This ensures
that we do not force a C++ runtime on the general code. This is fine
for now as C++ interop is not yet available for Swift. This prevents
the accidental mix-and-match of various C++ runtimes. This can cause
problems on platforms like android where `libstdc++` is an unsupported
runtime but is generally the default for Linux platforms.
2019-07-24 19:48: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
Saleem Abdulrasool
987c1fd657
Driver: pass -target immediately after clang++ (NFC)
...
This just adjusts the command invocation for the driver. It makes it
clear that the `clang` invocation was correct.
2019-07-21 17:12:26 -07:00
Jordan Rose
0ca9747863
Merge pull request #26206 from LucianoPAlmeida/qol-driver-toolchain-validate-args
...
[Qol] Driver toolchain validate args
2019-07-19 17:26:50 -07:00
Luciano Almeida
874f53daf1
Fixing spacing.
2019-07-19 19:21:09 -03:00
Luciano Almeida
c69d754758
Removing trailing.
2019-07-18 23:25:46 -03:00
Luciano Almeida
cfd882cfb6
Place back validate header.
2019-07-18 23:24:24 -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
Erik Eckstein
321d340331
Driver: Don't imply -enable-anonymous-context-mangled-names with optimizations enabled, even if -g is used.
...
The option -enable-anonymous-context-mangled-names prevents stripping of dead metadata to improve debuggability.
But with optimizations enabled, we do a lot of dead code stripping which affects debuggability anyway.
rdar://problem/48123944
2019-07-17 12:10:16 +02:00
Jordan Rose
419e97d7db
Merge pull request #26136 from LucianoPAlmeida/patch-sr11015
...
[Driver] DarwinToolChain should explicitly reject -static-stdlib
2019-07-16 08:55:25 -07:00
Luciano Almeida
ed432ac302
Missing forward
2019-07-15 22:56:56 -03:00
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