File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
benchmark/scripts/generate_harness Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -67,9 +67,18 @@ if(NOT SWIFT_LIBRARY_PATH)
67
67
set (SWIFT_LIBRARY_PATH "${tmp_dir} /lib/swift" )
68
68
endif ()
69
69
70
- runcmd (COMMAND "xcrun" "-toolchain" "${SWIFT_DARWIN_XCRUN_TOOLCHAIN} " "-f" "clang"
71
- VARIABLE CLANG_EXEC
72
- ERROR "Unable to find Clang driver" )
70
+ # If the CMAKE_C_COMPILER is already clang, don't find it again,
71
+ # thus allowing the --host-cc build-script argument to work here.
72
+ get_filename_component (c_compiler ${CMAKE_C_COMPILER} NAME )
73
+
74
+ if (${c_compiler} STREQUAL "clang" )
75
+ set (CLANG_EXEC ${CMAKE_C_COMPILER} )
76
+ else ()
77
+ runcmd (COMMAND "xcrun" "-toolchain" "${SWIFT_DARWIN_XCRUN_TOOLCHAIN} " "-f" "clang"
78
+ VARIABLE CLANG_EXEC
79
+ ERROR "Unable to find Clang driver" )
80
+ endif ()
81
+
73
82
74
83
# You have to delete CMakeCache.txt in the swift build to force a
75
84
# reconfiguration.
You can’t perform that action at this time.
0 commit comments