@@ -284,7 +284,7 @@ endif()
284284# The patches are generated from custom branch, with followin command:
285285# git format-patch -k origin/main
286286# The patches apply cleanly against llvm-project commit
287- # ed551e0778a35f00ab60f1c80d83ea8274d8d400 .
287+ # 327124ece7d59de56ca0f9faa2cd82af68c011b9 .
288288set (
289289 llvm_project_patches
290290 ${CMAKE_CURRENT_SOURCE_DIR} /patches/llvm-project/0001-libc-tests-with-picolibc-xfail-one-remaining-test .patch
@@ -333,18 +333,24 @@ if(NOT (LLVM_TOOLCHAIN_C_LIBRARY STREQUAL llvmlibc)) # libc in a separate repo?
333333 FetchContent_MakeAvailable(${LLVM_TOOLCHAIN_C_LIBRARY} )
334334endif ()
335335
336+ ##################################################################################################
337+ # We set all project properties later, this call is just to enable the
338+ # CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT check
339+ project (LLVMEmbeddedToolchainForArm)
336340# We generally want to install to a local directory to see what the
337341# output will look like rather than install into the system, so change
338342# the default accordingly.
339343# See https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT.html
340- # Note that this code only works after the first call to project so it
341- # can't be moved after the add_subdirectory command below.
344+ # Note that THIS CODE ONLY WORKS AFTER THE FIRST CALL TO PROJECT so it
345+ # can't be moved after the add_subdirectory(<llvm>) command below as it will be too late -
346+ # the llvm project will set it to the default system install directory.
342347if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
343348 set (CMAKE_INSTALL_PREFIX
344349 "${CMAKE_BINARY_DIR} /install"
345350 CACHE PATH "" FORCE
346351 )
347352endif ()
353+ ##################################################################################################
348354
349355# Whether to try to build C++ libraries. (We can't currently do this
350356# for all choices of C library.)
@@ -1245,6 +1251,7 @@ function(
12451251 -DLIBCXXABI_USE_COMPILER_RT=ON
12461252 -DLIBCXXABI_USE_LLVM_UNWINDER=ON
12471253 -DLIBCXXABI_TEST_PARAMS=executor=${test_executor}
1254+ -DLIBCXXABI_SHARED_OUTPUT_NAME ="c++abi-shared"
12481255 -DLIBCXX_ABI_UNSTABLE=ON
12491256 -DLIBCXX_CXX_ABI=libcxxabi
12501257 -DLIBCXX_STATICALLY_LINK_ABI_IN_STATIC_LIBRARY=ON
@@ -1253,12 +1260,14 @@ function(
12531260 -DLIBCXX_ENABLE_STATIC=ON
12541261 -DLIBCXX_INCLUDE_BENCHMARKS=OFF
12551262 -DLIBCXX_TEST_PARAMS=executor=${test_executor}
1263+ -DLIBCXX_SHARED_OUTPUT_NAME ="c++-shared"
12561264 -DLIBUNWIND_ENABLE_SHARED=OFF
12571265 -DLIBUNWIND_ENABLE_STATIC=ON
12581266 -DLIBUNWIND_IS_BAREMETAL=ON
12591267 -DLIBUNWIND_REMEMBER_HEAP_ALLOC=ON
12601268 -DLIBUNWIND_USE_COMPILER_RT=ON
12611269 -DLIBUNWIND_TEST_PARAMS=executor=${test_executor}
1270+ -DLIBUNWIND_SHARED_OUTPUT_NAME ="unwind-shared"
12621271 -DLLVM_LIT_ARGS=${LLVM_LIT_ARGS}
12631272 -DLLVM_ENABLE_RUNTIMES=libcxxabi,libcxx,libunwind
12641273 -DRUNTIME_TEST_ARCH_FLAGS=${flags}
@@ -1520,7 +1529,7 @@ function(add_nonexistent_library_variant)
15201529 )
15211530 cmake_parse_arguments (ERR "" "${one_value_args} " "" ${ARGN} )
15221531
1523- string (APPEND multilib_yaml_content "- FatalError : \" ${ERR_ERROR_MESSAGE} \"\n " )
1532+ string (APPEND multilib_yaml_content "- Error : \" ${ERR_ERROR_MESSAGE} \"\n " )
15241533
15251534 string (APPEND multilib_yaml_content " Flags:\n " )
15261535 string (REPLACE " " ";" multilib_flags_list ${ERR_MULTILIB_FLAGS} )
0 commit comments