Skip to content

Commit

Permalink
[XLA:GPU] Fix MacOS build
Browse files Browse the repository at this point in the history
The standard format for the linker option is `-rpath,<path>`.
The `-rpath=<path>` is a GNU extension that MacOS linker doesn't recognize.

PiperOrigin-RevId: 716139155
  • Loading branch information
mooskagh authored and copybara-github committed Jan 16, 2025
1 parent 7a7caf7 commit ace059b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions third_party/gpus/rocm/BUILD.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ cc_library(
name = "rocm_rpath",
linkopts = select({
":build_hermetic": [
"-Wl,-rpath=%{rocm_toolkit_path}/lib",
"-Wl,-rpath,%{rocm_toolkit_path}/lib",
],
"//conditions:default": [
"-Wl,-rpath=/opt/rocm/lib",
"-Wl,-rpath,/opt/rocm/lib",
],
}),
visibility = ["//visibility:public"],
Expand Down Expand Up @@ -168,7 +168,7 @@ cc_library(
],
# workaround to bring tensile files to the same fs layout as expected in the lib
# rocblas assumes that tensile files are located in ../roblas/libraries directory
linkopts = ["-Wl,-rpath=local_config_rocm/rocm/rocm_dis/lib"],
linkopts = ["-Wl,-rpath,local_config_rocm/rocm/rocm_dis/lib"],
strip_include_prefix = "%{rocm_root}",
visibility = ["//visibility:public"],
deps = [":rocm_config"],
Expand Down Expand Up @@ -225,7 +225,7 @@ cc_library(
],
# workaround to bring miopen db files to the same fs layout as expected in the lib
# rocblas assumes that miopen db files are located in ../share/miopen/db directory
linkopts = ["-Wl,-rpath=local_config_rocm/rocm/rocm_dis/lib"],
linkopts = ["-Wl,-rpath,local_config_rocm/rocm/rocm_dis/lib"],
strip_include_prefix = "%{rocm_root}",
visibility = ["//visibility:public"],
deps = [":rocm_config"],
Expand Down Expand Up @@ -367,7 +367,7 @@ cc_library(
],
# workaround to bring tensile files to the same fs layout as expected in the lib
# hibplatslt assumes that tensile files are located in ../hipblaslt/libraries directory
linkopts = ["-Wl,-rpath=local_config_rocm/rocm/rocm_dis/lib"],
linkopts = ["-Wl,-rpath,local_config_rocm/rocm/rocm_dis/lib"],
strip_include_prefix = "%{rocm_root}",
visibility = ["//visibility:public"],
deps = [":rocm_config"],
Expand Down

0 comments on commit ace059b

Please sign in to comment.