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

Commit df863b3

Browse files
authored
[SYCL] Remove -fPIC option on Windows (#718)
1 parent 73e832f commit df863b3

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
@@ -155,7 +155,12 @@
155155
config.substitutions.append( ('%include_option', '-include' ) )
156156
config.substitutions.append( ('%debug_option', '-g' ) )
157157
config.substitutions.append( ('%cxx_std_option', '-std=' ) )
158-
config.substitutions.append( ('%fPIC', '-fPIC') )
158+
# Position-independent code does not make sence on Windows. At the same
159+
# time providing this option for compilation targeting
160+
# x86_64-pc-windows-msvc will cause compile time error on some
161+
# configurations
162+
if platform.system() != "Windows":
163+
config.substitutions.append( ('%fPIC', '-fPIC') )
159164
config.substitutions.append( ('%shared_lib', '-shared') )
160165

161166
if not config.gpu_aot_target_opts:

0 commit comments

Comments
 (0)