-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix race condition when building LLVM for Windows
`llvm-tblgen` and `llvm-config` both try to build in the same NATIVE directory and end up stomping on each other. Co-authored-by: Valentin Churavy <vchuravy@gmail.com>
- Loading branch information
Showing
2 changed files
with
16 additions
and
0 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
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,15 @@ | ||
diff --git a/tools/llvm-config/CMakeLists.txt b/tools/llvm-config/CMakeLists.txt | ||
index a0bd36c..e73e943 100644 | ||
--- a/tools/llvm-config/CMakeLists.txt | ||
+++ b/tools/llvm-config/CMakeLists.txt | ||
@@ -77,5 +77,10 @@ if(CMAKE_CROSSCOMPILING AND NOT LLVM_CONFIG_PATH) | ||
add_custom_target(NativeLLVMConfig DEPENDS ${LLVM_CONFIG_PATH}) | ||
add_dependencies(NativeLLVMConfig CONFIGURE_LLVM_NATIVE) | ||
|
||
+ # Add a dependency on the host tblgen, which uses the same working | ||
+ # directory and with which we're otherwise racing to build some | ||
+ # of the utility libraries. | ||
+ add_dependencies(NativeLLVMConfig llvm-tablegen-host) | ||
+ | ||
add_dependencies(llvm-config NativeLLVMConfig) | ||
endif() |