Skip to content

Commit 5c35c32

Browse files
authored
llvm-libc build: fix build failure with C++ libs disabled (#632)
Testing the llvm-libc build after the previous commit, I found that the arm-multilib cmake script unconditionally tries to invoke build targets like `cxxlibs-configure` or `cxxlibs-build` in the individual library variant builds. Those targets don't exist in an llvm-libc build, because those set `"ENABLE_CXX_LIBS": "OFF"` in their per-variant JSON files. This commit applies the simplest possible fix: _make_ targets of those names in `arm-runtimes`, even if nothing is actually in them. Then invoking them from the higher-level build script is a NOP instead of a failure.
1 parent 13ad84a commit 5c35c32

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

arm-runtimes/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,14 @@ if(ENABLE_CXX_LIBS)
771771
endforeach()
772772
endif()
773773

774+
else() # if not ENABLE_CXX_LIBS
775+
776+
# The parent arm-multilib cmake script will still want to invoke
777+
# build targets like 'cxxlibs-configure', whether we actually have
778+
# C++ libraries or not. So we should define them, even if they
779+
# don't do anything.
780+
add_custom_target(cxxlibs-configure)
781+
add_custom_target(cxxlibs-build)
774782
endif()
775783

776784
install(

0 commit comments

Comments
 (0)