Skip to content

Commit

Permalink
[BuildBot] Add option to set compile target (#5024)
Browse files Browse the repository at this point in the history
Sometimes you don't need to build all the SYCL toolchain - added option to set
the needed build target.
  • Loading branch information
vmaksimo authored Nov 25, 2021
1 parent 185983b commit d8761fd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion buildbot/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def do_compile(args):
"cmake",
"--build", abs_obj_dir,
"--",
"deploy-sycl-toolchain",
args.build_target,
"-j", str(cpu_count)]

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

args = parser.parse_args()

Expand Down
7 changes: 7 additions & 0 deletions sycl/doc/GetStartedGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,13 @@ flags can be found by launching the script with `--help`):
* `-o` -> Path to build directory
* `--cmake-gen` -> Set build system type (e.g. `--cmake-gen "Unix Makefiles"`)

You can use the following flags with `compile.py` (full list of available flags
can be found by launching the script with `--help`):

* `-o` -> Path to build directory
* `-t`, `--build-target` -> Build target (e.g., `clang` or `llvm-spirv`). Default is `deploy-sycl-toolchain`
* `-j`, `--build-parallelism` -> Number of threads to use for compilation

**Please note** that no data about flags is being shared between `configure.py` and
`compile.py` scripts, which means that if you configured your build to be
placed in non-default directory using `-o` flag, you must also specify this flag
Expand Down

0 comments on commit d8761fd

Please sign in to comment.