diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt --- a/libclc/CMakeLists.txt +++ b/libclc/CMakeLists.txt @@ -89,6 +89,7 @@ set( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ) set( CMAKE_CLC_COMPILER ${LLVM_CLANG} ) set( CMAKE_CLC_ARCHIVE ${LLVM_LINK} ) +set( CMAKE_CLC_CREATE_STATIC_LIBRARY " -o " ) set( CMAKE_LLAsm_PREPROCESSOR ${LLVM_CLANG} ) set( CMAKE_LLAsm_COMPILER ${LLVM_AS} ) set( CMAKE_LLAsm_ARCHIVE ${LLVM_LINK} ) @@ -266,19 +267,23 @@ else() set( t "spir64--" ) endif() - set( build_flags -O0 -finline-hint-functions ) - set( opt_flags ) - set( spvflags --spirv-max-version=1.1 ) + set( build_flags -O0 -finline-hint-functions -Xclang -no-opaque-pointers ) + set( linker_flags --opaque-pointers=0 ) + set( opt_flags --opaque-pointers=0 ) + set( spvflags -opaque-pointers=0 --spirv-max-version=1.1 ) elseif( ${ARCH} STREQUAL "clspv" ) set( t "spir--" ) set( build_flags ) + set( linker_flags ) set( opt_flags -O3 ) elseif( ${ARCH} STREQUAL "clspv64" ) set( t "spir64--" ) set( build_flags ) + set( linker_flags ) set( opt_flags -O3 ) else() set( build_flags ) + set( linker_flags ) set( opt_flags -O3 ) endif() @@ -298,7 +303,8 @@ target_compile_options( builtins.link.${arch_suffix} PRIVATE -target ${t} ${mcpu} -fno-builtin -nostdlib ${build_flags} ) set_target_properties( builtins.link.${arch_suffix} PROPERTIES - LINKER_LANGUAGE CLC ) + LINKER_LANGUAGE CLC + STATIC_LIBRARY_OPTIONS "${linker_flags}" ) set( obj_suffix ${arch_suffix}.bc )