|
33 | 33 | CLIB_EXT = ".dll" if IS_WINDOWS else ".so" |
34 | 34 | SHARED_FLAG = "/DLL" if IS_WINDOWS else "-shared" |
35 | 35 | SYCL_FLAG = "-fsycl" |
36 | | -ABI_FLAG = "-fpreview-breaking-changes" if IS_LINUX else "" |
37 | 36 |
|
38 | 37 | MINIMUM_GCC_VERSION = (5, 0, 0) |
39 | 38 | MINIMUM_MSVC_VERSION = (19, 0, 24215) |
@@ -322,7 +321,7 @@ def _gen_link_lib_cmd_line( |
322 | 321 |
|
323 | 322 | libraries_args = [] |
324 | 323 | libraries_args += [f"-l{x}" for x in libraries] |
325 | | - common_args = [SHARED_FLAG] + [SYCL_FLAG] + [ABI_FLAG] |
| 324 | + common_args = [SHARED_FLAG] + [SYCL_FLAG] |
326 | 325 |
|
327 | 326 | """ |
328 | 327 | link command formats: |
@@ -453,7 +452,7 @@ def unix_wrap_ninja_link_shared_object( |
453 | 452 | # create output directories avoid linker error. |
454 | 453 | create_parent_dirs_by_path(output_libname) |
455 | 454 |
|
456 | | - ldflags = [SHARED_FLAG] + [SYCL_FLAG] + [ABI_FLAG] |
| 455 | + ldflags = [SHARED_FLAG] + [SYCL_FLAG] |
457 | 456 | ldflags += [f"-L{x}" for x in library_dirs] |
458 | 457 | ldflags += [f"-L{x}" for x in runtime_library_dirs] |
459 | 458 | ldflags += extra_postargs |
@@ -511,7 +510,7 @@ def spawn(cmd): |
511 | 510 |
|
512 | 511 | if "-fPIC" in cflags: # Windows does not support this argument |
513 | 512 | cflags.remove("-fPIC") |
514 | | - cflags = cflags + ["-std=c++17", SYCL_FLAG, ABI_FLAG] |
| 513 | + cflags = cflags + ["-std=c++17", SYCL_FLAG] |
515 | 514 |
|
516 | 515 | cmd = [_bin, "-c", src, "-o", obj] + include_list + cflags |
517 | 516 | elif isinstance(self.cflags, dict): |
@@ -1005,11 +1004,9 @@ def library_paths() -> List[str]: |
1005 | 1004 | def _prepare_compile_flags(extra_compile_args): |
1006 | 1005 | if isinstance(extra_compile_args, List): |
1007 | 1006 | extra_compile_args.append(SYCL_FLAG) |
1008 | | - extra_compile_args.append(ABI_FLAG) |
1009 | 1007 | elif isinstance(extra_compile_args, dict): |
1010 | 1008 | cl_flags = extra_compile_args.get("cxx", []) |
1011 | 1009 | cl_flags.append(SYCL_FLAG) |
1012 | | - cl_flags.append(ABI_FLAG) |
1013 | 1010 | extra_compile_args["cxx"] = cl_flags |
1014 | 1011 |
|
1015 | 1012 | return extra_compile_args |
@@ -1051,7 +1048,7 @@ def _prepare_ldflags(extra_ldflags, verbose, is_standalone): |
1051 | 1048 | oneapi_link_args += ["-Wl,--start-group"] |
1052 | 1049 | oneapi_link_args += [f"{x}" for x in get_one_api_help().get_onemkl_libraries()] |
1053 | 1050 | oneapi_link_args += ["-Wl,--end-group"] |
1054 | | - oneapi_link_args += ["-lOpenCL", "-lpthread", "-lm", "-ldl"] |
| 1051 | + oneapi_link_args += ["-lsycl", "-lOpenCL", "-lpthread", "-lm", "-ldl"] |
1055 | 1052 |
|
1056 | 1053 | # Append IPEX link parameters. |
1057 | 1054 | oneapi_link_args += ["-lintel-ext-pt-gpu"] |
@@ -1247,12 +1244,7 @@ def object_file_path(source_file: str) -> str: |
1247 | 1244 | return target |
1248 | 1245 |
|
1249 | 1246 | objects = [object_file_path(src) for src in sources] |
1250 | | - ldflags = ( |
1251 | | - ([] if is_standalone else [SHARED_FLAG]) |
1252 | | - + [SYCL_FLAG] |
1253 | | - + [ABI_FLAG] |
1254 | | - + extra_ldflags |
1255 | | - ) |
| 1247 | + ldflags = ([] if is_standalone else [SHARED_FLAG]) + [SYCL_FLAG] + extra_ldflags |
1256 | 1248 |
|
1257 | 1249 | # The darwin linker needs explicit consent to ignore unresolved symbols. |
1258 | 1250 | if IS_MACOS: |
|
0 commit comments