Commit Graph

1633 Commits

Author SHA1 Message Date
swift-ci
23279c072e Merge remote-tracking branch 'origin/master' into master-next 2019-09-20 18:10:22 -07:00
swift-ci
a8b334f1e1 Merge remote-tracking branch 'origin/master' into master-next 2019-09-20 15:29:01 -07:00
Rintaro Ishizaki
0569cbfb28 Revert "Revert "[SyntaxParse] Parse generic parameter clause and generic where clause""
This reverts commit 1584e87aa7.
2019-09-20 15:26:04 -07:00
Rintaro Ishizaki
1584e87aa7 Revert "[SyntaxParse] Parse generic parameter clause and generic where clause" 2019-09-20 14:02:53 -07:00
swift-ci
da140a852a Merge remote-tracking branch 'origin/master' into master-next 2019-09-20 11:09:43 -07:00
Rintaro Ishizaki
f919b2ddd8 [SyntaxParse] Parse generic parameter clause and generic where clause 2019-09-19 23:09:58 -07:00
swift-ci
0c440ff5ef Merge remote-tracking branch 'origin/master' into master-next 2019-09-13 20:49:32 -07:00
Harlan Haskins
c82c9b8210 [ModuleInterfaces] Remove references to 'parseable' interfaces everywhere
Now that we've settled on Module Interface as the name, let's remove the
vestiges of "Parseable Interfaces"
2019-09-13 14:55:48 -07:00
swift-ci
1898d99830 Merge remote-tracking branch 'origin/master' into master-next 2019-08-30 08:09:38 -07:00
Saleem Abdulrasool
89516d00e7 build: dereference variable as appropriate
Certain versions of CMake behave differently with variable expansion.  This may
be evaluated incorrectly in some versions.  Dereference the value explicitly.
2019-08-29 13:54:20 -07:00
Arnold Schwaighofer
02b908dca3 Merge remote-tracking branch 'origin/master' into master-next 2019-08-28 06:51:13 -07:00
Michael Gottesman
447f00892a [ownership] Enable ownership lowering on overlays. I still need to flip the switch to enable this on the tests/rest of the world. 2019-08-27 18:26:15 -07:00
swift-ci
b503ced230 Merge remote-tracking branch 'origin/master' into master-next 2019-08-22 16:29:14 -07:00
Alex Langford
61be4d969f [CMake][NFC] Introduce component targets for proper dependency tracking
This commit introduces a CMake target for each component, adds install targets
for them, and switches build-script-impl to use the target `install-components`
for installation. Each of the targets for each component depends on each
of the individual targets and outputs that are associated with the
corresponding swift-component.

This is equivalent to what already exists, because right now install rules are
only generated for components that we want to install. Therefore, this commit
should be an NFC.

This is a resubmission (with modifications) of an earlier change. I originally
committed this but there were problems with some installation rules.
2019-08-22 10:16:50 -07:00
swift-ci
48b6666028 Merge remote-tracking branch 'origin/master' into master-next 2019-08-19 18:30:07 -07:00
Alex
1319fbd29e Revert "[CMake] Fix up and fill out swift exports." 2019-08-19 15:28:51 -07:00
swift-ci
cb4532f3e5 Merge remote-tracking branch 'origin/master' into master-next 2019-08-19 14:50:41 -07:00
Jonas Devlieghere
89377a4f6d Move Xcode support to C++14
Ninja builds already inherit C++ from LLVM.
2019-08-15 12:55:19 -07:00
Alex Langford
f7dde8d419 [CMake] Fix up SwiftConfig and SwiftExports 2019-08-09 11:02:50 -07:00
Ben Langmuir
327c666b8a Revert "[CMake][NFC] Introduce component targets for proper dependency tracking" 2019-08-08 16:35:59 -07:00
Alex Langford
50a0e87c69 [CMake][NFC] Introduce component targets for proper dependency tracking
This commit introduces a CMake target for each component, adds install targets
for them, and switches build-script-impl to use the target `install-components`
for installation. Each of the targets for each component depends on each
of the individual targets and outputs that are associated with the
corresponding swift-component.

This is equivalent to what already exists, because right now install rules are
only generated for components that we want to install. Therefore, this commit
should be an NFC.
2019-08-08 11:50:35 -07:00
Daniel Rodríguez Troitiño
7e332e4437 Merge pull request #23208 from buttaface/droid
[android] Add support for natively building on Android
2019-08-05 08:39:40 -07:00
Alex Langford
184d942ba0 [CMake] add_swift_target_library shouldn't implicitly set INSTALL_IN_TARGET
This makes it more explicit what the install component of a target
library is if you don't see one (and its marked as IS_SDK_OVERLAY).
Explicit in this case makes more sense, as you don't have to rely on
knowledge of how `add_swift_target_library` is implemented to understand
what component is used to install the target.
2019-08-02 13:51:52 -07:00
swift-ci
e6ae7867bf Merge pull request #26441 from alexshap/linux_compile_flags 2019-08-01 18:46:57 -07:00
swift-ci
d5d4ac672b Merge pull request #26338 from xiaobai/debride-option 2019-08-01 18:42:33 -07:00
Alex Langford
8519460e00 [CMake] Fix small bug in _add_swift_library_single
This option should be `SWIFTLIB_SINGLE_TARGET_LIBRARY`. If you rely on
`SWIFTLIB_TARGET_LIBRARY`, you get whatever was set in add_swift_target_library.
While these should be the same, I'm trying to remove `SWIFTLIB_TARGET_LIBRARY`
entirely.
2019-08-01 15:36:03 -07:00
Alexander Shaposhnikov
6febe07dec Introduce SWIFT_COMPILE_FLAGS_LINUX 2019-07-31 16:28:04 -07:00
Butta
796d6ade9a [android] Add support for natively building on Android
Check if building on Android through the ANDROID_DATA environment variable, then set
SWIFT_ANDROID_NATIVE_SYSROOT to the default layout for the Termux app, and key all the
include, lib, and other SDK paths off of that. The system libc and a few other libraries
are linked against from /system/lib[64]. Finally, check if lit is running natively on
Android and don't use adb if so.
2019-07-30 00:38:36 +05:30
Alex Langford
a16c71cc86 [CMake] Remove TARGET_LIBRARY option from add_swift_target_library
If you're calling add_swift_target_library, you already know it's a
target library.
2019-07-24 14:55:08 -07:00
Alex Langford
b9e01b6309 [CMake][NFC] Remove unused logic to choose swift component
add_swift_target_library should always have `TARGET_LIBRARY` set. A few
lines down, there is a precondition that makes sure that it is set. This
check and subsequent assignment of `SWIFTLIB_INSTALL_IN_TARGET` should
never get triggered.
2019-07-23 15:12:40 -07:00
Alex Langford
07214e1377 [CMake] Support cmake install components for targets with multiple target files
When installing a target, you could have multiple target files with
different rules for installation. For example, you can specify rules for
`RUNTIME` files, `LIBRARY` files, `ARCHIVE` files, etc. Each of these
can take several options, e.g. `DESTINATION`. When you want to specify
the install component for a target, each of the different target file
rules need to have their own `COMPONENT` field. If not, they end up as
"Unspecified" which means they will not get installed with the
associated swift component.
2019-07-17 13:27:41 -07:00
Saleem Abdulrasool
80b92eb745 Merge pull request #26070 from compnerd/one-more-time-gotta-change-the-flags
build: use `-isystem` rather than `-I` for C++ headers
2019-07-10 15:31:32 -07:00
Saleem Abdulrasool
a2408642f2 build: use -isystem rather than -I for C++ headers
The system headers should be given lower priority than the user
specified headers.  This requires that we include the system C++ headers
as `-isystem`.  Without this, it is not possible to use a custom
toolchain to replace the clang compiler for building the android
runtime.
2019-07-10 13:58:39 -07:00
Puyan Lotfi
1551e014b4 Adding -nostdinc++ to Android build of Swift.
On Android, we explicitly setup the include paths for the C++ headers.
As a result, we do not want to pick up any system headers that the
toolchain may have visible to it. If this flag is not added then clang
will look in the wrong places to get the headers for things like stddef
etc.
2019-07-09 14:11:05 -07:00
Brent Royal-Gordon
fe3ec0c717 Revert "build: improve libedit handling for builds" 2019-07-07 12:08:37 -07:00
Saleem Abdulrasool
aca0509ac0 build: improve libedit handling for builds
Use the `FindLibEdit.cmake` module from LLDB to properly control where
the libedit libraries are searched for and linked from as well as where
the headers come from.  This uses the standard mechanisms which allows
users to control where libedit is pulled from (which is important for
cross-compilation).
2019-07-06 14:33:03 -07:00
Saleem Abdulrasool
140e02d0ef build: dereference a variable when checking (NFC)
Some versions of CMake dereference the variable here and others do not.
Explicitly dereference to ensure that the library name is properly set.
Failure to do so will fail to load the library as the output path
becomes the name.
2019-07-04 10:41:35 -07:00
Saleem Abdulrasool
8f023dd688 Merge pull request #25881 from compnerd/caching-by-default
build: convert parameter to cached value
2019-07-01 08:57:01 -07:00
Saleem Abdulrasool
336566fcfc build: dereference some variables for android x64
These variables need to be dereferenced on some versions of CMake.  This
should fix the android x64 nightlies.
2019-06-29 21:37:17 -07:00
Saleem Abdulrasool
d11f9abeef build: convert parameter to cached value
This converts the local variable to a cached variable which the user can
specify.  By making this a cached variable, it is easier to control and
ensure that a default value is provided.
2019-06-28 20:00:17 -07:00
Saleem Abdulrasool
ee5e11ae0d build: allow configuration of the system header location
Rather than hardcoding the paths to /usr/include, allow the user to set
the path to their libc headers.  This is particularly important for
environments which may not use the traditional layout (e.g. exherbo) or
for builds which wish to build against an out-of-tree, non-system
installed libc for a Unix target which does not match the host system
(i.e. foreign cross-compilation).
2019-06-27 19:13:52 -07:00
Saleem Abdulrasool
fe86fa8cb4 build: fix the Windows SDK printing 2019-06-27 19:13:52 -07:00
Saleem Abdulrasool
74e7ea3a94 build: reorder SDK configuration messages (NFC)
This just reorders the printed order of the messages to be grouped
better.  This will be further augmented in the next set of changes which
improve the cross-compilation setup that we have currently to allow for
foreign environments better.
2019-06-27 18:48:21 -07:00
Saleem Abdulrasool
01e195c101 build: add a workaround for android NDK[<21]
The clang in the android NDK (as well as the current stable Clang in
Swift) have a bug with Android x86_64 targets where the CPU's 16-byte
(double-word) CAS instruction feature is disabled resulting in the
double word CAS being lowered to a libcall
(`__sync_val_compare_and_swap_16`) rather than the CPU instruction
(`cmpxchg16b`).  This results in the inability to link the content.
Work around this by enabling the feature manually in the build for now.
2019-06-25 14:20:42 -07:00
Vlad Gorlov
62dd6bda10 Android build on macOS Cross-Compile host: Fixes wrong Ninja rules generation. (#25576)
* Fixes wrong Ninja rules generation for Android build on macOS Cross-Compile host.

* PR review fixes.
2019-06-21 17:04:51 -07:00
Saleem Abdulrasool
a6c0e9438b build: allow the user to specify the llvm tools
This is needed for cross-compiling the toolchain to Windows ARM64 on
Windows x64 using Visual Studio which does not permit the NATIVE
sub-build to work properly.
2019-06-19 16:47:18 -07:00
Saleem Abdulrasool
1ab0008d23 Merge pull request #25523 from drodriguez/android-fix-test-build
[android] LINKER_LANGUAGE needs to be applied to executables too.
2019-06-18 12:35:12 -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
Saleem Abdulrasool
8bb91443a9 build: dereference variable for some versions of CMake
CMake quoting is odd and in some versions this would compare the wrong
strings.
2019-06-17 15:07:04 -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