Skip to content

Commit

Permalink
More diagnostics for how bitcode is being generated
Browse files Browse the repository at this point in the history
Signed-off-by: Larry Gritz <[email protected]>
  • Loading branch information
lgritz committed Jan 11, 2025
1 parent d1433af commit b1dfa3f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/cmake/llvm_macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ function ( EMBED_LLVM_BITCODE_IN_CPP src_list suffix output_name list_to_append_
if (NOT LLVM_BC_GENERATOR)
message (FATAL_ERROR "You must have a valid llvm bitcode generator (clang++) somewhere.")
endif ()
message (VERBOSE "Using LLVM_BC_GENERATOR ${LLVM_BC_GENERATOR} to generate bitcode.")
if (LLVM_BC_GENERATOR)
execute_process ( COMMAND ${LLVM_BC_GENERATOR} --version
OUTPUT_VARIABLE LLVM_BC_GENERATOR_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE )
endif ()
message (VERBOSE "Using LLVM_BC_GENERATOR ${LLVM_BC_GENERATOR} v${LLVM_BC_GENERATOR_VERSION} to generate bitcode.")

if (NOT LLVM_AS_TOOL)
find_program (LLVM_AS_TOOL NAMES "llvm-as"
Expand Down Expand Up @@ -81,7 +86,7 @@ function ( EMBED_LLVM_BITCODE_IN_CPP src_list suffix output_name list_to_append_
# Command to turn the .cpp file into LLVM assembly language .s, into
# LLVM bitcode .bc, then back into a C++ file with the bc embedded!
add_custom_command ( OUTPUT ${src_bc}
COMMAND echo
COMMAND echo "BITCODE GENERATION AND EMBEDDING COMMAND:"
${LLVM_COMPILE_FLAGS}
${ALL_INCLUDE_DIRS}
-DOSL_COMPILING_TO_BITCODE=1
Expand Down

0 comments on commit b1dfa3f

Please sign in to comment.