Skip to content

Commit 4ac8f47

Browse files
FIX: oneapi_backend building WIN (#1096)
* FIX: oneapi_backend building WIN * Update build_backend.py changes only for WIN
1 parent dd76406 commit 4ac8f47

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

scripts/build_backend.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ def build_cpp(cc, cxx, sources, targetprefix, targetname, targetsuffix, libs, li
8585
log.info(subprocess.list2cmdline(cmd))
8686
subprocess.check_call(cmd)
8787

88-
cmd = [cxx] + objfiles + library_dir_plat + ela + libs + additional_linker_opts
88+
if IS_WIN:
89+
cmd = [cxx] + ela + objfiles + library_dir_plat + libs + additional_linker_opts
90+
else:
91+
cmd = [cxx] + objfiles + library_dir_plat + ela + libs + additional_linker_opts
8992
log.info(subprocess.list2cmdline(cmd))
9093
subprocess.check_call(cmd)
9194
shutil.copy(f'{targetprefix}{targetname}{targetsuffix}',

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,8 @@ def build_oneapi_backend():
310310
cxx = 'icx'
311311
else:
312312
cxx = 'icpx'
313-
eca += ['-fsycl']
314-
ela += ['-fsycl']
313+
eca = ['-fsycl'] + eca
314+
ela = ['-fsycl'] + ela
315315

316316
return build_backend.build_cpp(
317317
cc=cc,

0 commit comments

Comments
 (0)