forked from NixOS/nixpkgs
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Needs cleanup - Need to check if swift-nix-toolchain.patch is still necessary. - Should enable verbose-build, IMHO - Can we build less? Tweak buildbot_linux preset? - Currently fails at: [3400/3403][ 99%][2567.938s] Performing build step for 'compiler-rt' [104/806][ 12%][0.798s] Building C object lib/builtins/CMakeFiles/clang_rt.cc_kext_x86_64_osx.dir/os_version_check.c.o FAILED: lib/builtins/CMakeFiles/clang_rt.cc_kext_x86_64_osx.dir/os_version_check.c.o /tmp/nix-build-swift-5.1.1.drv-0/build/buildbot_linux/llvm-macosx-x86_64/./bin/clang -DKERNEL_USE -O3 -DNDEBUG -arch x86_64 -isysroot /nix/store/afpv8r50svbrmdmk56wcwpzyp5zac3l5-SDKs/MacOSX10.12.sdk -isysroot /nix/store/afpv8r50svbrmdmk56wcwpzyp5zac3l5-SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.5 -fPIC -O3 -fvisibility=hidden -DVISIBILITY_HIDDEN -Wall -fomit-frame-pointer -arch x86_64 -mkernel -MD -MT lib/builtins/CMakeFiles/clang_rt.cc_kext_x86_64_osx.dir/os_version_check.c.o -MF lib/builtins/CMakeFiles/clang_rt.cc_kext_x86_64_osx.dir/os_version_check.c.o.d -o lib/builtins/CMakeFiles/clang_rt.cc_kext_x86_64_osx.dir/os_version_check.c.o -c /tmp/nix-build-swift-5.1.1.drv-0/src/llvm/projects/compiler-rt/lib/builtins/os_version_check.c /tmp/nix-build-swift-5.1.1.drv-0/src/llvm/projects/compiler-rt/lib/builtins/os_version_check.c:18:10: fatal error: 'TargetConditionals.h' file not found #include <TargetConditionals.h> ^~~~~~~~~~~~~~~~~~~~~~ 1 error generated. [113/806][ 14%][0.848s] Building C object lib/builtins/CMakeFiles/clang_rt.cc_kext_x86_64_osx.dir/popcountti2.c.o ninja: build stopped: subcommand failed. FAILED: tools/clang/runtime/compiler-rt-stamps/compiler-rt-build cd /tmp/nix-build-swift-5.1.1.drv-0/build/buildbot_linux/llvm-macosx-x86_64/tools/clang/runtime/compiler-rt-bins && /nix/store/mrz74myz60ig4asl3ldrch86mhwlfsai-cmake-3.18.4/bin/cmake --build . && /nix/store/mrz74myz60ig4asl3ldrch86mhwlfsai-cmake-3.18.4/bin/cmake -E touch /tmp/nix-build-swift-5.1.1.drv-0/build/buildbot_linux/llvm-macosx-x86_64/tools/clang/runtime/compiler-rt-stamps//compiler-rt-build ninja: build stopped: subcommand failed.
- Loading branch information
Showing
3 changed files
with
93 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
pkgs/development/compilers/swift/patches/swift-darwin-sandbox.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Disable Darwin build-time checks broken within the sandbox | ||
|
||
--- a/utils/swift_build_support/swift_build_support/host.py | ||
+++ b/utils/swift_build_support/swift_build_support/host.py | ||
@@ -44,7 +44,6 @@ def _darwin_system_memory(): | ||
|
||
|
||
_PER_PLATFORM_SYSTEM_MEMORY = { | ||
- ('Darwin', 'x86_64'): _darwin_system_memory | ||
} | ||
|
||
|
||
@@ -79,8 +78,6 @@ def _darwin_max_num_swift_parallel_lto_link_jobs(): | ||
|
||
|
||
_PER_PLATFORM_MAX_PARALLEL_LTO_JOBS = { | ||
- ('Darwin', 'x86_64'): (_darwin_max_num_llvm_parallel_lto_link_jobs, | ||
- _darwin_max_num_swift_parallel_lto_link_jobs) | ||
} | ||
|
||
|
30 changes: 30 additions & 0 deletions
30
pkgs/development/compilers/swift/patches/swift-nix-toolchain.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Force PATH lookup of toolchain on all platforms | ||
|
||
--- a/utils/swift_build_support/swift_build_support/toolchain.py | ||
+++ b/utils/swift_build_support/swift_build_support/toolchain.py | ||
@@ -16,6 +16,7 @@ Represent toolchain - the versioned executables. | ||
|
||
from __future__ import absolute_import | ||
|
||
+import os | ||
import platform | ||
|
||
from . import cache_util | ||
@@ -192,9 +193,16 @@ class Haiku(GenericUnix): | ||
super(Haiku, self) | ||
|
||
|
||
+class Nix(GenericUnix): | ||
+ def __init__(self): | ||
+ super(Nix, self).__init__(['']) | ||
+ | ||
+ | ||
def host_toolchain(**kwargs): | ||
sys = platform.system() | ||
- if sys == 'Darwin': | ||
+ if 'NIX_BUILD_TOP' in os.environ: | ||
+ return Nix() | ||
+ elif sys == 'Darwin': | ||
return MacOSX(kwargs.pop('xcrun_toolchain', 'default')) | ||
elif sys == 'Linux': | ||
return Linux() |