Skip to content

[build] Remove redundant block applying '-mcx16' flag again for Android x86_64 #35023

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

Merged
merged 1 commit into from
Dec 21, 2020
Merged
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
15 changes: 0 additions & 15 deletions stdlib/cmake/modules/AddSwiftStdlib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -273,21 +273,6 @@ function(_add_target_variant_c_compile_flags)
endif()
endif()

if(${CFLAGS_SDK} STREQUAL ANDROID)
if(${CFLAGS_ARCH} STREQUAL x86_64)
# NOTE(compnerd) Android NDK 21 or lower will generate library calls to
# `__sync_val_compare_and_swap_16` rather than lowering to the CPU's
# `cmpxchg16b` instruction as the `cx16` feature is disabled due to a bug
# in Clang. This is being fixed in the current master Clang and will
# hopefully make it into Clang 9.0. In the mean time, workaround this in
# the build.
if(CMAKE_C_COMPILER_ID MATCHES Clang AND CMAKE_C_COMPILER_VERSION
VERSION_LESS 9.0.0)
list(APPEND result -mcx16)
endif()
endif()
endif()

if(CFLAGS_ENABLE_ASSERTIONS)
list(APPEND result "-UNDEBUG")
else()
Expand Down