Skip to content
Browse files

Add option to disable using embedded LLVM bitcode, in case building i…

…t with

clang++ is not possible for some reason. On by default except on Windows
where it was already disabled.
  • Loading branch information...
1 parent 1899395 commit c66c29b03082e06d0018b894d19e102100f21352 @brechtvl brechtvl committed with lgritz
Showing with 8 additions and 1 deletion.
  1. +5 −0 Makefile
  2. +2 −0 src/CMakeLists.txt
  3. +1 −1 src/liboslexec/CMakeLists.txt
View
5 Makefile
@@ -64,6 +64,10 @@ ifneq (${LLVM_STATIC},)
MY_CMAKE_FLAGS += -DLLVM_STATIC:BOOL=${LLVM_STATIC}
endif
+ifneq (${USE_LLVM_BITCODE},)
+MY_CMAKE_FLAGS += -DUSE_LLVM_BITCODE:BOOL=${USE_LLVM_BITCODE}
+endif
+
ifneq (${NAMESPACE},)
MY_CMAKE_FLAGS += -DOSL_NAMESPACE:STRING=${NAMESPACE}
endif
@@ -239,6 +243,7 @@ help:
@echo " make LLVM_DIRECTORY=xx ... Specify where LLVM lives"
@echo " make LLVM_NAMESPACE=xx ... Specify custom LLVM namespace"
@echo " make LLVM_STATIC=1 Use static LLVM libraries"
+ @echo " make USE_LLVM_BITCODE=0 Don't generate embedded LLVM bitcode"
@echo " make NAMESPACE=name Wrap OSL APIs in another namespace"
@echo " make HIDE_SYMBOLS=1 Hide symbols not in the public API"
@echo " make USE_BOOST_WAVE=1 Use Boost 'wave' insted of cpp"
View
2 src/CMakeLists.txt
@@ -118,8 +118,10 @@ set (HIDE_SYMBOLS OFF CACHE BOOL "Hide symbols not in the public API")
set (USE_TBB ON CACHE BOOL "Use TBB if needed")
if (WIN32)
set (USE_BOOST_WAVE ON CACHE BOOL "Use Boost Wave as preprocessor")
+ set (USE_LLVM_BITCODE OFF CACHE BOOL "Generate embedded LLVM bitcode")
else ()
set (USE_BOOST_WAVE OFF CACHE BOOL "Use Boost Wave as preprocessor")
+ set (USE_LLVM_BITCODE ON CACHE BOOL "Generated embedded LLVM bitcode")
endif ()
set (USE_PARTIO ON CACHE BOOL "Use Partio if found")
View
2 src/liboslexec/CMakeLists.txt
@@ -101,7 +101,7 @@ MACRO ( LLVM_COMPILE llvm_src srclist )
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
ENDMACRO ( )
-if (NOT WIN32)
+if (USE_LLVM_BITCODE)
LLVM_COMPILE ( llvm_ops.cpp liboslexec_srcs )
else ()
# With MSVC/Mingw, we don't compile llvm_ops.cpp to LLVM bitcode, due

0 comments on commit c66c29b

Please sign in to comment.
Something went wrong with that request. Please try again.