Skip to content

Commit d8761fd

Browse files
authored
[BuildBot] Add option to set compile target (#5024)
Sometimes you don't need to build all the SYCL toolchain - added option to set the needed build target.
1 parent 185983b commit d8761fd

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

buildbot/compile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def do_compile(args):
3131
"cmake",
3232
"--build", abs_obj_dir,
3333
"--",
34-
"deploy-sycl-toolchain",
34+
args.build_target,
3535
"-j", str(cpu_count)]
3636

3737
if args.verbose:
@@ -58,6 +58,7 @@ def main():
5858
parser.add_argument("-o", "--obj-dir", metavar="OBJ_DIR", help="build directory")
5959
parser.add_argument("-j", "--build-parallelism", metavar="BUILD_PARALLELISM", help="build parallelism")
6060
parser.add_argument("-v", "--verbose", action='store_true', help="verbose build output")
61+
parser.add_argument("-t", "--build-target", metavar="BUILD_TARGET", default="deploy-sycl-toolchain", help="set build target")
6162

6263
args = parser.parse_args()
6364

sycl/doc/GetStartedGuide.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,13 @@ flags can be found by launching the script with `--help`):
116116
* `-o` -> Path to build directory
117117
* `--cmake-gen` -> Set build system type (e.g. `--cmake-gen "Unix Makefiles"`)
118118

119+
You can use the following flags with `compile.py` (full list of available flags
120+
can be found by launching the script with `--help`):
121+
122+
* `-o` -> Path to build directory
123+
* `-t`, `--build-target` -> Build target (e.g., `clang` or `llvm-spirv`). Default is `deploy-sycl-toolchain`
124+
* `-j`, `--build-parallelism` -> Number of threads to use for compilation
125+
119126
**Please note** that no data about flags is being shared between `configure.py` and
120127
`compile.py` scripts, which means that if you configured your build to be
121128
placed in non-default directory using `-o` flag, you must also specify this flag

0 commit comments

Comments
 (0)