|
143 | 143 | config.substitutions.append( ('%debug_option', '/DEBUG' ) )
|
144 | 144 | config.substitutions.append( ('%cxx_std_option', '/std:' ) )
|
145 | 145 | config.substitutions.append( ('%fPIC', '') )
|
| 146 | + config.substitutions.append( ('%shared_lib', '/LD') ) |
146 | 147 | else:
|
147 | 148 | config.substitutions.append( ('%sycl_options', ' -lsycl -I' +
|
148 | 149 | config.sycl_include + ' -I' + os.path.join(config.sycl_include, 'sycl')) )
|
149 | 150 | config.substitutions.append( ('%include_option', '-include' ) )
|
150 | 151 | config.substitutions.append( ('%debug_option', '-g' ) )
|
151 | 152 | config.substitutions.append( ('%cxx_std_option', '-std=' ) )
|
152 | 153 | config.substitutions.append( ('%fPIC', '-fPIC') )
|
| 154 | + config.substitutions.append( ('%shared_lib', '-shared') ) |
153 | 155 |
|
154 | 156 | if not config.gpu_aot_target_opts:
|
155 | 157 | config.gpu_aot_target_opts = '"-device *"'
|
|
329 | 331 | config.available_features.add('sycl-ls')
|
330 | 332 |
|
331 | 333 | # TODO properly set XPTIFW include and runtime dirs
|
332 |
| -xptifw_lib = os.path.join(config.dpcpp_root_dir, 'lib') |
| 334 | +xptifw_lib_dir = os.path.join(config.dpcpp_root_dir, 'lib') |
333 | 335 | xptifw_dispatcher = ""
|
334 | 336 | if platform.system() == "Linux":
|
335 |
| - xptifw_dispatcher = os.path.join(xptifw_lib, 'libxptifw.so') |
| 337 | + xptifw_dispatcher = os.path.join(xptifw_lib_dir, 'libxptifw.so') |
336 | 338 | elif platform.system() == "Windows":
|
337 | 339 | xptifw_dispatcher = os.path.join(config.dpcpp_root_dir, 'bin', 'xptifw.dll')
|
338 | 340 | xptifw_includes = os.path.join(config.dpcpp_root_dir, 'include')
|
339 | 341 | if os.path.exists(xptifw_lib) and os.path.exists(os.path.join(xptifw_includes, 'xpti', 'xpti_trace_framework.h')):
|
340 | 342 | config.available_features.add('xptifw')
|
341 |
| - config.substitutions.append(('%xptifw_lib', "-L{} -I{}".format(xptifw_lib, xptifw_includes))) |
342 | 343 | config.substitutions.append(('%xptifw_dispatcher', xptifw_dispatcher))
|
| 344 | + if platform.system() == "Linux": |
| 345 | + config.substitutions.append(('%xptifw_lib', " {}/xptifw.lib".format(xptifw_lib_dir))) |
| 346 | + elif platform.system() == "Windows": |
| 347 | + config.substitutions.append(('%xptifw_lib', "-L{} -I{} -lxptifw".format(xptifw_lib_dir, xptifw_includes))) |
| 348 | + |
343 | 349 |
|
344 | 350 | llvm_tools = ["llvm-spirv", "llvm-link"]
|
345 | 351 | for llvm_tool in llvm_tools:
|
|
0 commit comments