Commit Graph

1731 Commits

Author SHA1 Message Date
Michael Gottesman
6bc28ff1c9 [strip -ST] Disable runtime stack trace dumping on Darwin when asserts are disabled.
This commit disables runtime stack trace dumping via dladdr on Darwin when
asserts are disabled.

This stack trace dumping was added as a way to improve the ability to debug the
compiler for compiler developers. This is all well and good but having such a
feature always enabled prevents us from reducing the size of the swift standard
library by eliminating the swift nlist.

rdar://31372220
2017-05-04 16:46:26 -06:00
Doug Gregor
66b11cbc3d [SE-0160] Make deprecated @objc inference warnings opt-in.
The warnings about deprecated @objc inference in Swift 3 mode can be a
bit annoying; and are mostly relevant to the migration workflow. Make
the warning emission a three-state switch:

* None (the default): don't warn about these issues.
* Minimal (-warn-swift3-objc-inference-minimal): warn about direct
  uses of @objc entrypoints and provide "@objc" Fix-Its for them.
* Complete (-warn-swift3-objc-inference-complete): warn about all
  cases where Swift 3 infers @objc but Swift 4 will not.

Fixes rdar://problem/31922278.
2017-05-01 16:25:50 -07:00
Ted Kremenek
758d5d465a Resolve merge conflict. 2017-04-25 16:21:56 -07: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
Ted Kremenek
d36b0b6b1f Compile all standard library as Swift 3 mode. 2017-04-19 22:36:34 -07:00
Ted Kremenek
6106868eb1 Force -swift-version 3 for Standard Library and overlays. 2017-04-19 21:58:40 -07:00
practicalswift
7eb7d5b109 [gardening] Fix 100 typos. 2017-04-18 17:01:42 +02:00
Hugh Bellamy
7692a1a706 Improve error message for missing response file in line-directive 2017-04-06 22:55:55 +07:00
Doug Coleman
d28e13a230 Merge pull request #8493 from erg/cmake-gyb-expand
cmake: Teach cmake that gyb files depend on foo in ``gyb.expand('foo.swift.gyb'...)``
2017-04-03 09:13:20 -07:00
practicalswift
288cb35b36 Merge pull request #8495 from practicalswift/gardening-20170402
[gardening] Remove unused variables and methods. Fix \t. Use isa<T>(). Typos.
2017-04-03 09:58:44 +02:00
Doug Coleman
f8475f3d50 cmake: Teach cmake that gyb files depend on foo in `gyb.expand('foo.swift.gyb'...)`
Fixes https://bugs.swift.org/browse/SR-4366.
Fixes rdar://problem/31331437.
2017-04-02 22:30:29 -07: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
practicalswift
ca72b12287 [gardening] Remove accidental \t:s 2017-04-02 16:03:54 +02:00
Doug Gregor
6244abf9f9 [Driver] Surface -warn-swift3-objc-inference to swiftc.
The `-warn-swift3-objc-inference` option turns out to be extremely
useful in vetting code for unintended `@objc` entry points, so make it
available directly on `swiftc`.

But, bury the enable/disable flags under `-frontend` (they were
effectively there anyway because the driver wasn't propagating them).
2017-03-31 21:53:59 -07:00
Doug Gregor
79440cd7f4 [CMake] Warn about @objc inferred via the deprecated rules in stdlib/overlay builds
We want to know about these, both because they have an impact on our migration to Swift 4 and because we don’t want to vend extra Objective-C entry points.
2017-03-31 21:22:16 -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
f3ce6b78f4 cmake: Allow version numbers to be cache variables.
This change allows them to be overridden from the command line yet still
keep default values.
2017-03-29 14:39:54 -07:00
Hugh Bellamy
1d1d070f13 Remove old .swiftdoc file before creating new .swiftdoc file 2017-03-25 14:47:19 +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
a4c6af1968 Merge pull request #8122 from aschwaighofer/cow_existential_runtime
Runtime changes for the copy-on-write existential implementation
2017-03-16 12:48:35 -07:00
Hugh Bellamy
9907502ede Add /permissive- flags with VS2017 2017-03-16 22:02:01 +07:00
Doug Coleman
9adb2385df cmake: Remove non-useful message. 2017-03-15 16:09:50 -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
2121daaf50 Merge pull request #8077 from erg/cmake-overlays-standalone
WIP: cmake: Initial standalone overlays builds. This is just the cmake
2017-03-14 15:31:01 -07:00
Greg Parker
25653ac891 [build] Disallow calls to objc_msgSend() with no function pointer cast. 2017-03-14 13:35:39 -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
Arnold Schwaighofer
d42c806d60 Add an option to build the runtime with copy-on-write existentials 2017-03-09 17:22:35 -08:00
Gonzalo Larralde
443e7614e4 Fixes on linker executable variables per target.
* `prefix` should be `sdk` in runtime cmake list file
* typo on variable existence checking
2017-03-07 10:00:58 -03:00
Saleem Abdulrasool
122d101f78 Merge pull request #7776 from compnerd/atomic-abi
build: enable ABI breaking std::atomic changes on MSVC
2017-02-27 13:38:59 -08:00
Mikio Takeuchi
a1efa55c63 Add -swift-stdlib-use-nonatomic-rc option to build-script-impl. std::getenv is still used in SILOptions.h since it has a wider coverage 2017-02-27 12:17:53 +09: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
Saleem Abdulrasool
125e882c8c build: permit overriding the linker
When cross-compiling for android ARM, it is possible that the system
linker does not support the target.  However, in order to cross-compile
the target runtime, we need to adjust the linker to the target linker.
If one is not specified, fall back to the current behaviour of using the
system linker.
2017-02-26 11:25:07 -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
Saleem Abdulrasool
d2fcc0c123 Merge pull request #7451 from hughbe/remove-swiftmodule
Fix build, edit, build loop on Windows
2017-02-19 11:38:59 -08:00
Hugh Bellamy
718f3ba6b0 Fix build break 2017-02-18 21:19:51 +07:00
Hugh Bellamy
15550fdc32 Don't append ".a" for LLVM/Clang/gtest dependencies on Windows 2017-02-18 16:20:31 +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