Skip to content

Commit c62b57d

Browse files
authored
[SYCL] Remove -fPIC option on Windows (intel#718) (intel#524)
1 parent 10a7317 commit c62b57d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

SYCL/lit.cfg.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,12 @@
150150
config.substitutions.append( ('%include_option', '-include' ) )
151151
config.substitutions.append( ('%debug_option', '-g' ) )
152152
config.substitutions.append( ('%cxx_std_option', '-std=' ) )
153-
config.substitutions.append( ('%fPIC', '-fPIC') )
153+
# Position-independent code does not make sence on Windows. At the same
154+
# time providing this option for compilation targeting
155+
# x86_64-pc-windows-msvc will cause compile time error on some
156+
# configurations
157+
if platform.system() != "Windows":
158+
config.substitutions.append( ('%fPIC', '-fPIC') )
154159
config.substitutions.append( ('%shared_lib', '-shared') )
155160

156161
if not config.gpu_aot_target_opts:

0 commit comments

Comments
 (0)