From d9dd7cca66d005ca82ba8d3166207ca595cb1fce Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Sat, 26 Oct 2019 18:11:08 -0700 Subject: Swift: correct flags for parallel jobs `-num-threads` is for the threading, not the job control. Use `-j` to launch the parallel jobs. This enables parallel builds for Swift again after driver updates preventing the parallelization through `-num-threads`. --- Modules/CMakeSwiftInformation.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/CMakeSwiftInformation.cmake b/Modules/CMakeSwiftInformation.cmake index 4f1d4f0..69d3900 100644 --- a/Modules/CMakeSwiftInformation.cmake +++ b/Modules/CMakeSwiftInformation.cmake @@ -72,7 +72,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL Windows) endif() if(NOT CMAKE_Swift_CREATE_SHARED_LIBRARY) - set(CMAKE_Swift_CREATE_SHARED_LIBRARY " -output-file-map -incremental -num-threads ${CMAKE_Swift_NUM_THREADS} -emit-library -o -module-name -module-link-name -emit-module -emit-module-path -emit-dependencies ${CMAKE_Swift_IMPLIB_LINKER_FLAGS} ") + set(CMAKE_Swift_CREATE_SHARED_LIBRARY " -output-file-map -incremental -j ${CMAKE_Swift_NUM_THREADS} -emit-library -o -module-name -module-link-name -emit-module -emit-module-path -emit-dependencies ${CMAKE_Swift_IMPLIB_LINKER_FLAGS} ") endif() if(NOT CMAKE_Swift_CREATE_SHARED_MODULE) @@ -80,11 +80,11 @@ if(NOT CMAKE_Swift_CREATE_SHARED_MODULE) endif() if(NOT CMAKE_Swift_LINK_EXECUTABLE) - set(CMAKE_Swift_LINK_EXECUTABLE " -output-file-map -incremental -num-threads ${CMAKE_Swift_NUM_THREADS} -emit-executable -o -emit-module -emit-module-path -emit-dependencies ${CMAKE_Swift_IMPLIB_LINKER_FLAGS} ") + set(CMAKE_Swift_LINK_EXECUTABLE " -output-file-map -incremental -j ${CMAKE_Swift_NUM_THREADS} -emit-executable -o -emit-module -emit-module-path -emit-dependencies ${CMAKE_Swift_IMPLIB_LINKER_FLAGS} ") endif() if(NOT CMAKE_Swift_CREATE_STATIC_LIBRARY) - set(CMAKE_Swift_CREATE_STATIC_LIBRARY " -output-file-map -incremental -num-threads ${CMAKE_Swift_NUM_THREADS} -emit-library -static -o -module-name -module-link-name -emit-module -emit-module-path -emit-dependencies ") + set(CMAKE_Swift_CREATE_STATIC_LIBRARY " -output-file-map -incremental -j ${CMAKE_Swift_NUM_THREADS} -emit-library -static -o -module-name -module-link-name -emit-module -emit-module-path -emit-dependencies ") set(CMAKE_Swift_ARCHIVE_CREATE " crs ") set(CMAKE_Swift_ARCHIVE_FINISH "") -- cgit v0.12