From 5ee1a6cec1786e52f2a1214a922433391b838833 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Sun, 13 Nov 2022 19:03:26 +0000 Subject: [PATCH 1/3] Utilities/bootstrap: fix ignored `--clang-path` option Ignoring this option caused issues on certain Linux distributions, where the process of bringing up clang is convoluted and `bootstrap` ended up using GCC, which caused build failures. --- Utilities/bootstrap | 1 + 1 file changed, 1 insertion(+) diff --git a/Utilities/bootstrap b/Utilities/bootstrap index 9301b93300b..c78dc151521 100755 --- a/Utilities/bootstrap +++ b/Utilities/bootstrap @@ -500,6 +500,7 @@ def build_with_cmake(args, cmake_args, ninja_args, source_path, build_dir): "-DCMAKE_BUILD_TYPE:=Debug", "-DCMAKE_Swift_FLAGS='%s'" % swift_flags, "-DCMAKE_Swift_COMPILER:=%s" % (args.swiftc_path), + "-DCMAKE_C_COMPILER:=%s" % (args.clang_path), ] + cmake_args + [source_path] if args.verbose: From 18e25d62db705e2130ac4926fbdcfe55f1daa8f3 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Sun, 13 Nov 2022 19:21:32 +0000 Subject: [PATCH 2/3] Utilities/bootstrap: also use Swift's clang for llbuild --- Utilities/bootstrap | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Utilities/bootstrap b/Utilities/bootstrap index c78dc151521..fcdee222a35 100755 --- a/Utilities/bootstrap +++ b/Utilities/bootstrap @@ -530,8 +530,8 @@ def build_llbuild(args): call(["touch", "codemodel-v2"], cwd=api_dir, verbose=args.verbose) flags = [ - "-DCMAKE_C_COMPILER:=clang", - "-DCMAKE_CXX_COMPILER:=clang++", + "-DCMAKE_C_COMPILER:=%s" % (args.clang_path), + "-DCMAKE_CXX_COMPILER:=%s" % (args.clang_path), "-DLLBUILD_SUPPORT_BINDINGS:=Swift", ] From a9ef6b87f4365d4cd36f714ef0acbfd921a01ce0 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Wed, 30 Nov 2022 12:35:04 +0000 Subject: [PATCH 3/3] Utilities/bootstrap: pass `CC` env var in `swiftpm_args` --- Utilities/bootstrap | 1 + 1 file changed, 1 insertion(+) diff --git a/Utilities/bootstrap b/Utilities/bootstrap index fcdee222a35..4cf9da2f263 100755 --- a/Utilities/bootstrap +++ b/Utilities/bootstrap @@ -619,6 +619,7 @@ def build_swiftpm_with_swiftpm(args, integrated_swift_driver): swiftpm_args = [ "SWIFT_EXEC=" + args.swiftc_path, "SWIFT_DRIVER_SWIFT_EXEC=" + args.swiftc_path, + "CC=" + args.clang_path ] if args.bootstrap: