Skip to content

[compiler-rt] Correctly detect cross-compiling for adding flags #138868

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions compiler-rt/cmake/config-ix.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,7 @@ macro(get_test_cc_for_arch arch cc_out cflags_out)
if (NOT ${ARGC} EQUAL 3)
message(FATAL_ERROR "got too many args. expected 3, got ${ARGC} (namely: ${ARGV})")
endif()
if(ANDROID OR (NOT APPLE AND ${arch} MATCHES "arm|aarch64|riscv32|riscv64"))
# This is only true if we are cross-compiling.
if(CMAKE_CROSSCOMPILING)
# Build all tests with host compiler and use host tools.
set(${cc_out} ${COMPILER_RT_TEST_COMPILER})
set(${cflags_out} ${COMPILER_RT_TEST_COMPILER_CFLAGS})
Expand Down
Loading