Commit 7e3c708
committed
[Build] Repair the build for non-static-only static stdlib builds
When SWIFT_BUILD_STATIC_STDLIB=ON, SWIFT_BUILD_DYNAMIC_STDLIB=OFF, and
the sdk being built is not a static-only (e.g. WASI), the build fails
due to duplicate custom command rules against the same output path.
In the case of WASI, the static archive should be copied into lib/swift
by the first lipo target, and then the second lipo target should copy it
into lib/swift_static.
```
CMake Error at cmake/modules/SwiftAddCustomCommandTarget.cmake:144 (add_custom_command):
Attempt to add a custom rule to output
/home/build-user/build/buildbot_linux/wasmstdlib-linux-x86_64/lib/swift_static/wasi/libswiftCore.a.rule
which already has a custom rule.
Call Stack (most recent call first):
stdlib/cmake/modules/AddSwiftStdlib.cmake:673 (add_custom_command_target)
stdlib/cmake/modules/AddSwiftStdlib.cmake:2657 (_add_swift_lipo_target)
stdlib/public/core/CMakeLists.txt:401 (add_swift_target_library)
```1 parent ade04a7 commit 7e3c708
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2492 | 2492 | | |
2493 | 2493 | | |
2494 | 2494 | | |
2495 | | - | |
2496 | | - | |
2497 | | - | |
| 2495 | + | |
2498 | 2496 | | |
| 2497 | + | |
| 2498 | + | |
2499 | 2499 | | |
2500 | 2500 | | |
2501 | 2501 | | |
| |||
0 commit comments