Skip to content

Commit 028b83d

Browse files
npmillerbader
andauthored
[SYCL] Add --host-target flag and remove --arm flag (#6620)
This patch adds a new flag to `configure.py` to allow changing the host target to build, this makes it easier to build on different hosts such as ARM or PowerPC. This patch also removes the `--arm` flag as it is now redundant, `--host-target=ARM` or `--host-target=AArch64` should be used instead. This is slightly different than the original `--arm` flag as it only allows to enable one of the ARM platforms. But I'm not sure what the use case was for enabling both, as only one will be the host platform for a given build. And compilation time was given as a reason to drop the X86 architecture originally so only enabling the correct ARM architecture should also help with that. Co-authored-by: Alexey Bader <[email protected]>
1 parent c8427d6 commit 028b83d

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

buildbot/configure.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def do_configure(args):
2727
xpti_dir = os.path.join(abs_src_dir, "xpti")
2828
xptifw_dir = os.path.join(abs_src_dir, "xptifw")
2929
libdevice_dir = os.path.join(abs_src_dir, "libdevice")
30-
llvm_targets_to_build = 'X86'
30+
llvm_targets_to_build = args.host_target
3131
llvm_enable_projects = 'clang;' + llvm_external_projects
3232
libclc_targets_to_build = ''
3333
libclc_gen_remangled_variants = 'OFF'
@@ -48,10 +48,6 @@ def do_configure(args):
4848
if platform.system() == 'Windows' or (args.hip and args.hip_platform == 'AMD'):
4949
llvm_enable_projects += ';lld'
5050

51-
# replace not append, so ARM ^ X86
52-
if args.arm:
53-
llvm_targets_to_build = 'ARM;AArch64'
54-
5551
if args.enable_esimd_emulator:
5652
sycl_enabled_plugins.append("esimd_emulator")
5753

@@ -215,7 +211,8 @@ def main():
215211
parser.add_argument("--cuda", action='store_true', help="switch from OpenCL to CUDA")
216212
parser.add_argument("--hip", action='store_true', help="switch from OpenCL to HIP")
217213
parser.add_argument("--hip-platform", type=str, choices=['AMD', 'NVIDIA'], default='AMD', help="choose hardware platform for HIP backend")
218-
parser.add_argument("--arm", action='store_true', help="build ARM support rather than x86")
214+
parser.add_argument("--host-target", default='X86',
215+
help="host LLVM target architecture, defaults to X86, multiple targets may be provided as a semi-colon separated string")
219216
parser.add_argument("--enable-esimd-emulator", action='store_true', help="build with ESIMD emulation support")
220217
parser.add_argument("--enable-all-llvm-targets", action='store_true', help="build compiler with all supported targets, it doesn't change runtime build")
221218
parser.add_argument("--no-assertions", action='store_true', help="build without assertions")

0 commit comments

Comments
 (0)