diff --git a/.circleci/config.yml b/.circleci/config.yml index 1a1fe974..6e946a8b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,7 +17,7 @@ jobs: - run: name: configure # Use the libLLVM of the default LLVM/CLang, disable search for SPIRV-LLVM - command: mkdir build && cd build && sudo cmake ../ -DBUILD_NUMBER=$CIRCLE_BUILD_NUM -DCROSS_COMPILE=ON -DBUILD_TESTING=ON -DLLVMLIB_FRONTEND=ON -DSPIRV_FRONTEND=OFF -DSPIRV_COMPILER_ROOT=/tmp/skip-searching -DSYSROOT_CROSS=/home/idein/cross -DCROSS_COMPILER_PATH=${HOME}/x-tools/armv6-rpi-linux-gnueabihf/bin -DCROSS_COMPILER_PREFIX="armv6-rpi-linux-gnueabihf-" + command: mkdir build && cd build && sudo cmake ../ -DBUILD_NUMBER=$CIRCLE_BUILD_NUM -DCROSS_COMPILE=ON -DBUILD_TESTING=ON -DLLVMLIB_FRONTEND=ON -DSPIRV_FRONTEND=OFF -DSPIRV_COMPILER_ROOT=/tmp/skip-searching -DVC4CL_STDLIB_PRECOMPILE=OFF -DSYSROOT_CROSS=/home/idein/cross -DCROSS_COMPILER_PATH=${HOME}/x-tools/armv6-rpi-linux-gnueabihf/bin -DCROSS_COMPILER_PREFIX="armv6-rpi-linux-gnueabihf-" - run: name: make # TODO CicleCI runs out of memory diff --git a/CMakeLists.txt b/CMakeLists.txt index c761e011..578188eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,8 @@ option(ENABLE_COVERAGE "Enables collection of code coverage via gcov" OFF) option(CLANG_LIBRARY "Uses the libclang library for compilation, uses the clang executable otherwise" OFF) # Option whether to enable more compile-time checks option(ADVANCED_CHECKS "Enable advanced compile-time checks" OFF) +# Option to skipping pre-compiling the VC4CLStdLib standard-library headers at compile time. NOTE: The headers still need to be pre-compiled before execution! +option(VC4CL_STDLIB_PRECOMPILE "Enable pre-compiling of the VC4CLStdLib headers at compile time" ON) # Path to the VC4CL standard library # NOTE: Resolving ~ (for home directory) is currently not supported diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e16fcabd..1c3e83ff 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -137,12 +137,12 @@ add_dependencies(${VC4C_LIBRARY_NAME} variant-dependencies) target_include_directories(${VC4C_LIBRARY_NAME} SYSTEM PRIVATE ${variant_HEADERS}) target_include_directories(${VC4C_PROGRAM_NAME} SYSTEM PRIVATE ${variant_HEADERS}) -if(VC4CL_STDLIB_DIR) +if(VC4CL_STDLIB_PRECOMPILE AND VC4CL_STDLIB_DIR) # Pre-compile VC4CL standard library files if development headers available and output files do not yet exist add_custom_command(TARGET ${VC4C_PROGRAM_NAME} POST_BUILD COMMAND if \[ ! -e ${VC4CL_STDLIB_DIR}/VC4CLStdLib.bc -o ! -e ${VC4CL_STDLIB_DIR}/VC4CLStdLib.h.pch \]; then $ --quiet --precompile-stdlib -o ${VC4CL_STDLIB_DIR}/ ${VC4CL_STDLIB_DIR}/VC4CLStdLib.h && echo \"VC4CL standard library precompiled into ${VC4CL_STDLIB_DIR}\" \; fi ) -endif(VC4CL_STDLIB_DIR) +endif(VC4CL_STDLIB_PRECOMPILE AND VC4CL_STDLIB_DIR) # "For shared libraries VERSION and SOVERSION can be used to specify the build version and API version respectively." set_target_properties(