Skip to content

Commit e3d73ad

Browse files
committed
[clang-repl] Fix CMake errors when cross compiling
These stem from 4821c90. When cross compiling, CMAKE_SYSTEM_PROCESSOR is empty, if the target processor hasn't been set when setting up the cross compilation. Ideally, when setting up cross compilation with CMake, the user is supposed to set CMAKE_SYSTEM_PROCESSOR, but so far, compilation has worked just fine even without it. Quote the string where CMAKE_SYSTEM_PROCESSOR is expanded, to avoid argument errors when it expands to an empty string.
1 parent 7ec078e commit e3d73ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/tools/clang-repl/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ if(CLANG_PLUGIN_SUPPORT)
2323
export_executable_symbols_for_plugins(clang-repl)
2424
endif()
2525

26-
string(TOUPPER ${CMAKE_SYSTEM_PROCESSOR} system_processor)
26+
string(TOUPPER "${CMAKE_SYSTEM_PROCESSOR}" system_processor)
2727
if(system_processor MATCHES "ARM")
2828
set(FLAG_LONG_PLT "-Wl,--long-plt")
2929
llvm_check_linker_flag(CXX ${FLAG_LONG_PLT} LINKER_HAS_FLAG_LONG_PLT)

0 commit comments

Comments
 (0)