Skip to content

Commit 13256be

Browse files
authored
Merge pull request #83007 from compnerd/correction
utils: correct flag handling for static runtime libdispatch handling
2 parents 8522841 + a3e7e8b commit 13256be

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

utils/build.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2357,7 +2357,8 @@ function Build-ExperimentalRuntime {
23572357
CMAKE_Swift_COMPILER_TARGET = (Get-ModuleTriple $Platform);
23582358
CMAKE_Swift_COMPILER_WORKS = "YES";
23592359
# TODO(compnerd) enforce dynamic linking of BlocksRuntime and dispatch.
2360-
CMAKE_Swift_FLAGS = $(if ($Static) { @("-Xcc", "-static-libclosure", "-Xcc", "-Ddispatch_STATIC") } else { @() });
2360+
CMAKE_CXX_FLAGS = $(if ($Static) { @("-Ddispatch_STATIC") } else { @() });
2361+
CMAKE_Swift_FLAGS = $(if ($Static) { @("-Xcc", "-static-libclosure") } else { @() });
23612362
CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib";
23622363
CMAKE_SYSTEM_NAME = $Platform.OS.ToString();
23632364
CMAKE_NINJA_FORCE_RESPONSE_FILE = "YES";
@@ -2762,8 +2763,7 @@ function Build-ExperimentalSDK([Hashtable] $Platform) {
27622763
CMAKE_FIND_PACKAGE_PREFER_CONFIG = "YES";
27632764
CMAKE_Swift_COMPILER_TARGET = (Get-ModuleTriple $Platform);
27642765
CMAKE_Swift_COMPILER_WORKS = "YES";
2765-
# TODO(compnerd) enforce dynamic linking of BlocksRuntime and dispatch.
2766-
CMAKE_Swift_FLAGS = @("-static-stdlib", "-Xfrontend", "-use-static-resource-dir", "-Xcc", "-Ddispatch_STATIC");
2766+
CMAKE_Swift_FLAGS = @("-static-stdlib", "-Xfrontend", "-use-static-resource-dir");
27672767
CMAKE_STATIC_LIBRARY_PREFIX_Swift = "lib";
27682768
CMAKE_SYSTEM_NAME = $Platform.OS.ToString();
27692769

0 commit comments

Comments
 (0)