Commit Graph

11 Commits

Author SHA1 Message Date
Rick van Voorden
f8ae46b3f3 [inclusive-language] changed sanity to soundness 2024-01-25 18:18:02 -08: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
Brian Gesiak
1c5c75bec3 [CMake] Remove Xcode effective platform name check
The CMake function `get_effective_platform_for_triple` appears to only
be used in one location: from within `escape_path_for_xcode`.
The `get_effective_platform_for_triple` function's only purpose appears to be
to check whether `SWIFT_HOST_TRIPLE` contains the string "macos", and if not,
it emits an error.

However, because on macOS hosts the build-script-impl is responsible
for setting the `SWIFT_HOST_TRIPLE` variable, when `cmake -G Xcode` is invoked
directly to configure the Swift project, this variable is unset, and so
`get_effective_platform_for_triple` emits an error.

I considered two solutions:

1. Have `swift/CMakeLists.txt` set a default `SWIFT_HOST_TRIPLE`, as it
   does for Linux. This would prevent `get_effective_platform_for_triple`
   from emitting an error.
2. Remove `get_effective_platform_for_triple` altogether.

I chose (2) here. `get_effective_platform_for_triple` doesn't appear to
do anything besides restrict the host platform arbitrarily. If users
are somehow able to configure the project using `cmake -G Xcode` on
Linux, shouldn't the Swift's CMake allow them to do so?

Test plan:
1. Configure and build using Xcode and an in-tree Swift checkout.
2. Configure and build using `utils/build-script --xcode`.
2017-08-30 00:11:12 -04:00
Brian Gesiak
3123b47602 [cmake] Enable IN_LIST compare policy
Enable CMake policy CMP0057, which allows `if()` statements to use the `IN_LIST`
operator. In addition, simplify several `if()` statements that used the
`list(FIND ...)` operation instead.
2016-09-28 22:35:05 -04:00
Michael Gottesman
9e2a0b1979 [cmake] Fix Xcode build for Release LLVM + Debug Swift.
There were a couple of thinkos here that I had to fix. This passed on my
machine. Lets see if the bots agree.
2016-07-12 15:55:23 -07:00
Michael Gottesman
d65d5e3404 [cmake] Remove dead code. NFC. 2016-07-12 15:54:32 -07:00
Michael Gottesman
5c2cda0047 [cmake] Remove duplicated code. 2016-07-12 15:26:55 -07:00
Michael Gottesman
f71e544c62 [cmake] Fix thinko.
Instead of overwriting all of the paths for the other build configurations with
the one that LLVM selected, I was resetting the path for LLVM's build
configuration over and over again. = /.

This fixes the issue.
2016-07-12 13:58:16 -07:00
Michael Gottesman
b42b7f43d8 [cmake] Combine apply_xcode_substitutions and escape_llvm_path_for_xcode into a better escape_path_for_xcode that can be reused across cmake. 2016-07-08 09:51:18 -07:00
Michael Gottesman
455d3a1960 [cmake] Move the cmake xcode configuration code from SwiftSharedCMakeConfig.cmake => SwiftXcodeSupport.cmake. 2016-07-08 09:51:18 -07:00
Michael Gottesman
0e95abd35c [cmake] Move SwiftApplyXcodeSubstitutions.cmake => SwiftXcodeSupport.cmake.
As an additional fix, this moves the include of SwiftXcodeSupport to the one
place where its functionality is used, AddSwift.cmake. Keeping the include in
./CMakeLists.txt makes it seem like the functionality is needed there (when it
is not).

In a subsequent commit, I am going to refactor the xcode support I have been
adding to SwiftSharedCMakeConfig into this file and have SwiftSharedCMakeConfig
import it.
2016-07-08 09:51:18 -07:00