Skip to content

Commit

Permalink
llvm-libc build: fix build failure with C++ libs disabled (#632)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
statham-arm authored Jan 27, 2025
1 parent 13ad84a commit 5c35c32
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arm-runtimes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,14 @@ if(ENABLE_CXX_LIBS)
endforeach()
endif()

else() # if not ENABLE_CXX_LIBS

# The parent arm-multilib cmake script will still want to invoke
# build targets like 'cxxlibs-configure', whether we actually have
# C++ libraries or not. So we should define them, even if they
# don't do anything.
add_custom_target(cxxlibs-configure)
add_custom_target(cxxlibs-build)
endif()

install(
Expand Down

0 comments on commit 5c35c32

Please sign in to comment.