Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 8a28d78

Browse files
authored
Set object extension based on system and not driver used (#1030)
Running tests with clang-cl would set the proper object extension, but clang and clang++ on Windows would use the wrong .o extension.
1 parent 209c1c7 commit 8a28d78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

SYCL/lit.cfg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,10 @@
9494
config.substitutions.append( ('%sycl_libs_dir', config.sycl_libs_dir ) )
9595
if platform.system() == "Windows":
9696
config.substitutions.append( ('%sycl_static_libs_dir', config.sycl_libs_dir + '/../lib' ) )
97+
config.substitutions.append( ('%obj_ext', '.obj') )
9798
elif platform.system() == "Linux":
9899
config.substitutions.append( ('%sycl_static_libs_dir', config.sycl_libs_dir ) )
100+
config.substitutions.append( ('%obj_ext', '.o') )
99101
config.substitutions.append( ('%sycl_include', config.sycl_include ) )
100102

101103
if lit_config.params.get('gpu-intel-dg1', False):
@@ -159,7 +161,6 @@
159161
config.substitutions.append( ('%cxx_std_option', '/std:' ) )
160162
config.substitutions.append( ('%fPIC', '') )
161163
config.substitutions.append( ('%shared_lib', '/LD') )
162-
config.substitutions.append( ('%obj_ext', '.obj') )
163164
else:
164165
config.substitutions.append( ('%sycl_options', ' -lsycl -I' +
165166
config.sycl_include + ' -I' + os.path.join(config.sycl_include, 'sycl') +
@@ -173,7 +174,6 @@
173174
# configurations
174175
config.substitutions.append( ('%fPIC', ('' if platform.system() == 'Windows' else '-fPIC')) )
175176
config.substitutions.append( ('%shared_lib', '-shared') )
176-
config.substitutions.append( ('%obj_ext', '.o') )
177177

178178
if not config.gpu_aot_target_opts:
179179
config.gpu_aot_target_opts = '"-device *"'

0 commit comments

Comments
 (0)