diff --git a/.github/workflows/linux_post_commit.yml b/.github/workflows/linux_post_commit.yml index a308f0ab377b2..e6e71846dd2a8 100644 --- a/.github/workflows/linux_post_commit.yml +++ b/.github/workflows/linux_post_commit.yml @@ -35,7 +35,7 @@ jobs: mkdir -p $GITHUB_WORKSPACE/build cd $GITHUB_WORKSPACE/build python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \ - -s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release --no-ocl $ARGS + -s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release $ARGS - name: Compile run: | python3 $GITHUB_WORKSPACE/src/buildbot/compile.py -w $GITHUB_WORKSPACE \ diff --git a/.gitignore b/.gitignore index dfeba61ddba1f..3d8e2be46252d 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ # Nested build directory /build* +!buildbot #==============================================================================# # Explicit files to ignore (only matches one). diff --git a/buildbot/configure.py b/buildbot/configure.py index a88c5b9b1e2d4..1c70be89af251 100644 --- a/buildbot/configure.py +++ b/buildbot/configure.py @@ -26,6 +26,7 @@ def do_configure(args): llvm_enable_projects = 'clang;llvm-spirv;sycl;opencl-aot;xpti;libdevice' libclc_targets_to_build = '' sycl_build_pi_cuda = 'OFF' + sycl_werror = 'ON' llvm_enable_assertions = 'ON' llvm_enable_doxygen = 'OFF' llvm_enable_sphinx = 'OFF' @@ -42,6 +43,9 @@ def do_configure(args): libclc_targets_to_build = 'nvptx64--;nvptx64--nvidiacl' sycl_build_pi_cuda = 'ON' + if args.no_werror: + sycl_werror = 'OFF' + if args.no_assertions: llvm_enable_assertions = 'OFF' @@ -69,7 +73,7 @@ def do_configure(args): "-DLIBCLC_TARGETS_TO_BUILD={}".format(libclc_targets_to_build), "-DSYCL_BUILD_PI_CUDA={}".format(sycl_build_pi_cuda), "-DLLVM_BUILD_TOOLS=ON", - "-DSYCL_ENABLE_WERROR=ON", + "-DSYCL_ENABLE_WERROR={}".format(sycl_werror), "-DCMAKE_INSTALL_PREFIX={}".format(install_dir), "-DSYCL_INCLUDE_TESTS=ON", # Explicitly include all kinds of SYCL tests. "-DLLVM_ENABLE_DOXYGEN={}".format(llvm_enable_doxygen), @@ -78,7 +82,7 @@ def do_configure(args): "-DSYCL_ENABLE_XPTI_TRACING=ON" # Explicitly turn on XPTI tracing ] - if not args.no_ocl: + if args.system_ocl: cmake_cmd.extend([ "-DOpenCL_INCLUDE_DIR={}".format(ocl_header_dir), "-DOpenCL_LIBRARY={}".format(icd_loader_lib)]) @@ -120,7 +124,8 @@ def main(): parser.add_argument("--cuda", action='store_true', help="switch from OpenCL to CUDA") parser.add_argument("--no-assertions", action='store_true', help="build without assertions") parser.add_argument("--docs", action='store_true', help="build Doxygen documentation") - parser.add_argument("--no-ocl", action='store_true', help="download OpenCL deps via CMake") + parser.add_argument("--system-ocl", action='store_true', help="use OpenCL deps from system (no download)") + parser.add_argument("--no-werror", action='store_true', help="Don't treat warnings as errors") parser.add_argument("--shared-libs", action='store_true', help="Build shared libraries") parser.add_argument("--cmake-opt", action='append', help="Additional CMake option not configured via script parameters") diff --git a/sycl/doc/GetStartedGuide.md b/sycl/doc/GetStartedGuide.md index 4074fab5cd7b5..464c7587269ef 100644 --- a/sycl/doc/GetStartedGuide.md +++ b/sycl/doc/GetStartedGuide.md @@ -93,7 +93,8 @@ python %DPCPP_HOME%\llvm\buildbot\compile.py -s %DPCPP_HOME%\llvm -o %DPCPP_HOME You can use the following flags with `configure.py`: - * `--no-ocl` -> Download OpenCL deps via cmake (can be useful in case of troubles) + * `--system-ocl` -> Don't Download OpenCL deps via cmake but use the system ones + * `--no-werror` -> Don't treat warnings as errors when compiling llvm * `--cuda` -> use the cuda backend (see [Nvidia CUDA](#build-dpc-toolchain-with-support-for-nvidia-cuda)) * `--shared-libs` -> Build shared libraries * `-t` -> Build type (debug or release)