Skip to content

Commit 24f84ab

Browse files
hiaselhansbader
andauthored
[BuildBot] Modify configure script (#1421)
* use "--no-ocl" by default -> new "--system-ocl" flag (use system OpenCL headers and do not download) * add `--no-werror` to not treat warnings as errors * don't exclude buildbot dir in gitignore Signed-off-by: hiaselhans <simon.klemenc@gmail.com> Co-authored-by: Alexey Bader <alexey.bader@intel.com>
1 parent e7d4537 commit 24f84ab

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

.github/workflows/linux_post_commit.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
mkdir -p $GITHUB_WORKSPACE/build
3636
cd $GITHUB_WORKSPACE/build
3737
python3 $GITHUB_WORKSPACE/src/buildbot/configure.py -w $GITHUB_WORKSPACE \
38-
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release --no-ocl $ARGS
38+
-s $GITHUB_WORKSPACE/src -o $GITHUB_WORKSPACE/build -t Release $ARGS
3939
- name: Compile
4040
run: |
4141
python3 $GITHUB_WORKSPACE/src/buildbot/compile.py -w $GITHUB_WORKSPACE \

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
# Nested build directory
2525
/build*
26+
!buildbot
2627

2728
#==============================================================================#
2829
# Explicit files to ignore (only matches one).

buildbot/configure.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ def do_configure(args):
2626
llvm_enable_projects = 'clang;llvm-spirv;sycl;opencl-aot;xpti;libdevice'
2727
libclc_targets_to_build = ''
2828
sycl_build_pi_cuda = 'OFF'
29+
sycl_werror = 'ON'
2930
llvm_enable_assertions = 'ON'
3031
llvm_enable_doxygen = 'OFF'
3132
llvm_enable_sphinx = 'OFF'
@@ -42,6 +43,9 @@ def do_configure(args):
4243
libclc_targets_to_build = 'nvptx64--;nvptx64--nvidiacl'
4344
sycl_build_pi_cuda = 'ON'
4445

46+
if args.no_werror:
47+
sycl_werror = 'OFF'
48+
4549
if args.no_assertions:
4650
llvm_enable_assertions = 'OFF'
4751

@@ -69,7 +73,7 @@ def do_configure(args):
6973
"-DLIBCLC_TARGETS_TO_BUILD={}".format(libclc_targets_to_build),
7074
"-DSYCL_BUILD_PI_CUDA={}".format(sycl_build_pi_cuda),
7175
"-DLLVM_BUILD_TOOLS=ON",
72-
"-DSYCL_ENABLE_WERROR=ON",
76+
"-DSYCL_ENABLE_WERROR={}".format(sycl_werror),
7377
"-DCMAKE_INSTALL_PREFIX={}".format(install_dir),
7478
"-DSYCL_INCLUDE_TESTS=ON", # Explicitly include all kinds of SYCL tests.
7579
"-DLLVM_ENABLE_DOXYGEN={}".format(llvm_enable_doxygen),
@@ -78,7 +82,7 @@ def do_configure(args):
7882
"-DSYCL_ENABLE_XPTI_TRACING=ON" # Explicitly turn on XPTI tracing
7983
]
8084

81-
if not args.no_ocl:
85+
if args.system_ocl:
8286
cmake_cmd.extend([
8387
"-DOpenCL_INCLUDE_DIR={}".format(ocl_header_dir),
8488
"-DOpenCL_LIBRARY={}".format(icd_loader_lib)])
@@ -120,7 +124,8 @@ def main():
120124
parser.add_argument("--cuda", action='store_true', help="switch from OpenCL to CUDA")
121125
parser.add_argument("--no-assertions", action='store_true', help="build without assertions")
122126
parser.add_argument("--docs", action='store_true', help="build Doxygen documentation")
123-
parser.add_argument("--no-ocl", action='store_true', help="download OpenCL deps via CMake")
127+
parser.add_argument("--system-ocl", action='store_true', help="use OpenCL deps from system (no download)")
128+
parser.add_argument("--no-werror", action='store_true', help="Don't treat warnings as errors")
124129
parser.add_argument("--shared-libs", action='store_true', help="Build shared libraries")
125130
parser.add_argument("--cmake-opt", action='append', help="Additional CMake option not configured via script parameters")
126131

sycl/doc/GetStartedGuide.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ python %DPCPP_HOME%\llvm\buildbot\compile.py -s %DPCPP_HOME%\llvm -o %DPCPP_HOME
9393

9494
You can use the following flags with `configure.py`:
9595

96-
* `--no-ocl` -> Download OpenCL deps via cmake (can be useful in case of troubles)
96+
* `--system-ocl` -> Don't Download OpenCL deps via cmake but use the system ones
97+
* `--no-werror` -> Don't treat warnings as errors when compiling llvm
9798
* `--cuda` -> use the cuda backend (see [Nvidia CUDA](#build-dpc-toolchain-with-support-for-nvidia-cuda))
9899
* `--shared-libs` -> Build shared libraries
99100
* `-t` -> Build type (debug or release)

0 commit comments

Comments
 (0)