Commit Graph

826 Commits

Author SHA1 Message Date
Aaron Dierking
28984778bb build: additional section_magic conditional fix
The variable for the TARGET_LIBRARY option should be
SWIFTLIB_SINGLE_TARGET_LIBRARY.
2017-11-07 12:25:37 -08:00
Saleem Abdulrasool
3c402715e4 build: tweak the conditional for section_magic
This adjusts the conditional to ensure that the section_magic dependency
is only added on target libraries not host libraries (e.g.
SwiftDemangle).
2017-11-07 12:19:38 -08:00
Saleem Abdulrasool
5e4cd22e41 build: use VFS overlay for Windows SDK
The Windows SDK provides headers which have incorrect cases.  The
incorrect cases are in the SDK headers as well.  On case sensitive file
systems this causes build issues due to the incorrect name.  Use the
clang VFS overlay to avoid the need for providing copies to the expected
cases.  This improves the cross-compilation on Linux to Windows.
2017-11-03 12:50:47 -07:00
Saleem Abdulrasool
7e888d43cd SwiftDemangle: build on non-Darwin targets
This can be useful as a consumer for demangling swift symbols.  Build
the shared library on non-Darwin targets as well.
2017-11-01 13:39:37 -07:00
Anton
18da29d8ca [FreeBSD] Fix undefined references to __atomic* 2017-10-26 18:26:09 -07:00
Saleem Abdulrasool
15141bc217 build: quote library search path options
When passing the linker search path options to the driver, ensure that
we quote the argument.  We would previously incorrectly split the
arguments that were passed to the driver if there were spaces.  This
would manifest as link failures on Linux when cross-compiling to
Windows.
2017-09-27 19:08:42 -07:00
Saleem Abdulrasool
699bacae37 build: allow compilation for Windows ARM
The Windows ARM SDK is incomplete.  However, the headers are complete
enough to support building the runtime.  Add the necessary definitions
to permit the stdlib to be built.
2017-09-26 17:32:51 -07:00
Saleem Abdulrasool
27d051a6c3 build: improve the Windows build infrastructure
Rather than use the `INCLUDE` and `LIB` environment variables to build
the Windows code, use the `UniversalCRTSdkDir`, `UCRTVersion`, and
`VCToolsInstallDir` variables.  Using these we can compute the right set
of include directories and library search paths for the various
architectures.  This will enable us to build multiple variants of the
Windows stdlib at the same time.

Additionally, rather than relying on the magic environment variables to
be processed by the driver, pass them explicitly to the driver through
the build system.  This also is needed to allow parallel builds of
various architecture variants of the stdlib on Windows.
2017-09-23 16:08:42 -07:00
Calvin Hill
aee81d272f Add Initial platform support for Haiku. (#11583) 2017-09-22 21:06:56 -04:00
swift-ci
afe5c6b910 Merge pull request #12066 from compnerd/offsetof 2017-09-22 15:50:15 -07:00
Saleem Abdulrasool
3aea816d7c build: use more portable offsetof
When building for Windows, when using `offsetof` in a C++ context, we
would use a `reinterpret_cast`, which is not permissible in the context
of a `constexpr` statement which we do use.  Use a CRT specific macro to
use the `__builtin_offsetof` version of the implementation.  Repairs the
Windows stdlib build with the new include path handling.
2017-09-22 13:08:49 -07:00
Saleem Abdulrasool
b25894b4a4 build: add additional case of special handling for exherbo
The file system layout on exherbo is different from most other Linux
distributions.  Add an additional ignored case for the include paths for
when cross-compiling the stdlib to additional targets.
2017-09-21 23:09:26 -07:00
Amr Aboelela
4bf6f5475d Android: adding swift suffix to icu generated libs to resolve conflict with Android's icu libs 2017-08-21 16:17:17 -07:00
Mishal Shah
64a77ca716 Update master to build with Xcode 9 beta 4, macOS 10.13, iOS 11, tvOS 11, and watchOS 4 SDKs. 2017-07-28 11:17:59 -07:00
Arnold Schwaighofer
f2c8c2a256 Cleanup dead configuration code for copy-on-write existentials
Copy-on-write existentials are enabled and none of these flags are used
2017-07-17 12:22:03 -07:00
Saleem Abdulrasool
3c4c910e7b build: create and use a wrapper for add_llvm_tool_symlink
Introduce a new function `add_swift_tool_symlink`.  Use this instead of the
`add_llvm_tool_symlink` and `install_in_swift_component`.  This mimics the
behaviour in clang as well as the general pattern of renaming the functions from
the LLVM build infrastructure.
2017-06-16 15:59:12 -07:00
Robert Widmann
b9836e64e2 Merge pull request #9869 from johnno1962a/master
Ensure fatalError message logged on Android
2017-06-07 09:15:04 -07:00
Arnold Schwaighofer
ca63326e1b Delete unused existential value witnesses from the old existential
implementation

And remove the SWIFT_RUNTIME_ENABLE_COW_EXISTENTIALS flag.
2017-06-02 14:34:41 -07:00
John Holdsworth
304f556f5d Cmake changes for -llog and -latomic V 2017-06-01 01:53:29 +01:00
John Holdsworth
b5bd098d23 Cmake changes for -llog and -latomic IV 2017-06-01 01:35:55 +01:00
John Holdsworth
32bd9f1e49 Cmake changes for -llog and -latomic III 2017-06-01 01:25:55 +01:00
John Holdsworth
0ab8788cc8 Cmake changes for -llog and -latomic II 2017-05-30 23:16:58 +01:00
John Holdsworth
c7ea92a280 Cmake changes for -llog and -latomic 2017-05-30 22:26:30 +01:00
Doug Coleman
f51f47b7c0 cmake: Don't generate targets for empty sdk/arch combinations.
See rdar://31642132.
2017-04-21 13:45:45 -07:00
practicalswift
7eb7d5b109 [gardening] Fix 100 typos. 2017-04-18 17:01:42 +02:00
Arnold Schwaighofer
d202256d1f Add -DSWIFT_RUNTIME_ENABLE_COW_EXISTENTIALS=1 when compiling the front-end
This should fix building a --debug-build
2017-04-02 12:49:26 -07:00
Doug Coleman
74c048ad90 cmake: Add `-Fsystem ${SDK_PATH}/System/Library/PrivateFrameworks`
for overlays builds.

Related to rdar://problem/28466433
2017-03-30 11:57:50 -07:00
Doug Coleman
e7390d1770 Revert "utils: Add swiftenvs, which allow the overriding of compiler tools."
This reverts commit 2b923f3846.
2017-03-22 20:09:34 -07:00
Doug Coleman
9880f65767 Revert "cmake: Ensure that CMAKE_CODESIGN is set instead of trying to run empty"
This reverts commit f3b7485369.
2017-03-22 20:09:34 -07:00
Doug Coleman
f3b7485369 cmake: Ensure that CMAKE_CODESIGN is set instead of trying to run empty
commands.
2017-03-21 21:13:12 -07:00
Doug Coleman
2b923f3846 utils: Add swiftenvs, which allow the overriding of compiler tools. 2017-03-21 14:59:12 -07:00
Arnold Schwaighofer
d5cbb0bd62 Runtime changes for the copy-on-write existential implementation
Adds the runtime implementation for copy-on-write existentials. This support is
enabled if SWIFT_RUNTIME_ENABLE_COW_EXISTENTIALS is defined. Focus is on
correctness -- not performance yet.

Don't use allocate/deallocate/projectBuffer witnesses for globals in cow
existential mode.

Use SWIFT_RUNTIME_ENABLE_COW_EXISTENTIALS configuration to set the default for
SILOptions.

This includes an IRGen fix to use the right projection in
emitMetatypeOfOpaqueExistential if SWIFT_RUNTIME_ENABLE_COW_EXISTENTIALS is set.

Use unknownRetain instead of native retain in dynamicCastToExistential.
2017-03-15 14:54:55 -07:00
Doug Coleman
8c2bd5ae23 cmake: Initial standalone overlays builds.
./utils/build-overlay AVFoundation OSX macosx
rdar://problem/28707246
2017-03-14 12:51:42 -07:00
Saleem Abdulrasool
04ca723570 build: enable ABI breaking std::atomic changes on MSVC
The std::atomic implementation in MSVC broke ABI compatibility across a
minor update (VS2015U2).  Permit the ABI breaking change for the use in
the runtime.
2017-02-26 17:27:15 -08:00
practicalswift
d352652a72 Merge pull request #7727 from practicalswift/typos-20170223
[gardening] Fix typos
2017-02-24 09:15:12 +01:00
Hugh Bellamy
99f9581802 Merge pull request #5904 from hughbe/windows-cmake
Add support for building Swift on Windows with clang-cl and MSVC
2017-02-24 07:52:11 +07:00
practicalswift
33a5601ad1 [gardening] Fix typos 2017-02-23 22:46:40 +01:00
Hugh Bellamy
781820b470 Fixup omitting frame pointers on various compilers and architectures (#7626)
* Omit leaf frame pointers on i686 architectures

This is x86. See the root CMakeLists.txt file
```
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86")
set(SWIFT_HOST_VARIANT_ARCH_default "i686")
```

* Use the correct flags to omit leaf frame pointers with clang-cl and MSVC

* Don't omit leaf frame pointers on 64 bit architectures
2017-02-22 11:17:17 +07:00
Hugh Bellamy
3d5396794f Fix misc compiler flags passed to MSVC/clang-cl 2017-02-20 17:07:11 +07:00
Hugh Bellamy
b60945fbd8 [CMake] Use correct compiler flag for unoptimized MSVC/clang-cl builds 2017-02-20 15:15:32 +07:00
swift-ci
25722bb750 Merge pull request #7632 from hughbe/msvc-specific 2017-02-19 23:45:57 -08:00
Hugh Bellamy
9f9da4b647 [CMake] Simplify consecutive identical if statements 2017-02-20 14:04:24 +07:00
Hugh Bellamy
0da22a2e53 Fixup Windows specific compiler flags passed to MSVC/Clang-cl 2017-02-20 14:03:33 +07:00
Hugh Bellamy
1098e61ae1 Fix debug info flags passed to MSVC/clang-cl 2017-02-20 13:38:49 +07:00
Hugh Bellamy
119faa8cfe Don't attempt to set a custom linker when building with MSVC/clang-cl on Windows 2017-02-18 13:11:37 +07:00
Hugh Bellamy
03a9709b33 Don't pass -nostdlib when linking with MSVC/Clang-cl 2017-02-18 12:58:41 +07:00
Hugh Bellamy
097a18e4cc Merge pull request #7559 from hughbe/cmake-dead-code
[CMake] remove some unused functions and versioning dead code
2017-02-18 00:09:46 +07:00
Hugh Bellamy
aba6d41648 [CMake] remove redundant generator expression checks
The minimum version of CMake is 3.4.3
2017-02-17 14:33:08 +07:00
Hugh Bellamy
9746582ece [CMake] Replace manual fatal error messages in AddSwift.cmake with preconditions 2017-02-17 11:51:15 +07:00
Chris Bieneman
01b36c061a [CMake] Re-apply all the changes from PR7500
This was reverted in PR7517 as collateral for an unrelated issue.
2017-02-16 10:07:28 -08:00