From 3b6f55587ea72e7f8c6df235d8cf1a8f5c1fad0e Mon Sep 17 00:00:00 2001 From: Lee Kerley Date: Mon, 10 Jun 2024 17:02:09 -0700 Subject: [PATCH] add CMAKE_OSX_SYSROOT when compiling bitcode. --- src/cmake/llvm_macros.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cmake/llvm_macros.cmake b/src/cmake/llvm_macros.cmake index 3afeef19d..00c5989c2 100644 --- a/src/cmake/llvm_macros.cmake +++ b/src/cmake/llvm_macros.cmake @@ -84,6 +84,10 @@ function ( EMBED_LLVM_BITCODE_IN_CPP src_list suffix output_name list_to_append_ COMMAND ${LLVM_BC_GENERATOR} ${LLVM_COMPILE_FLAGS} ${ALL_INCLUDE_DIRS} + + # Added to force the discovery of the c++ standard headers on MACOS + -isysroot ${CMAKE_OSX_SYSROOT} + -DOSL_COMPILING_TO_BITCODE=1 -Wno-deprecated-register # the following 2 warnings can be restored when all 3rd parties have fixed their export macros