From dc6f750da014ef1668f400ea4dd1525110e66d2e Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Thu, 15 Jan 2026 22:39:12 +0000 Subject: [PATCH] Fix CMake checks for Linux The LINUX variable is not a thing (at least not by default). Use an explicit CMAKE_SYSTEM_NAME check. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d171a677591..6b4cf08524d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -222,7 +222,7 @@ if(NOT MSVC AND NOT EMSCRIPTEN) endif() # The version of clang currently on our Mac bots doesn't seem to support this flag. -if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND (LINUX OR WINDOWS)) +if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT APPLE) add_link_flag("-fuse-ld=lld") endif() @@ -473,7 +473,7 @@ if(BUILD_STATIC_LIB) else() message(STATUS "Building libbinaryen as shared library.") add_library(binaryen SHARED) - if(LINUX) + if(CMAKE_SYSTEM_NAME STREQUAL "Linux") # Disable interposition and resolve Binaryen symbols locally. add_link_flag("-Bsymbolic") endif()