35 lines
2.1 KiB
Diff
35 lines
2.1 KiB
Diff
|
|
diff --git a/rust/private/rustc.bzl b/rust/private/rustc.bzl
|
||
|
|
index a28ad50b7..af627fe50 100644
|
||
|
|
--- a/rust/private/rustc.bzl
|
||
|
|
+++ b/rust/private/rustc.bzl
|
||
|
|
@@ -2361,19 +2361,19 @@ def _get_make_link_flag_funcs(target_os, target_abi, use_direct_link_driver):
|
||
|
|
- callable: The function for producing link args.
|
||
|
|
- callable: The function for formatting link library names.
|
||
|
|
"""
|
||
|
|
+
|
||
|
|
+ get_lib_name = get_lib_name_default
|
||
|
|
+
|
||
|
|
if target_os == "windows":
|
||
|
|
- make_link_flags_windows_msvc = _make_link_flags_windows_msvc_direct if use_direct_link_driver else _make_link_flags_windows_msvc_indirect
|
||
|
|
- make_link_flags_windows_gnu = _make_link_flags_windows_gnu_direct if use_direct_link_driver else _make_link_flags_windows_gnu_indirect
|
||
|
|
- make_link_flags = make_link_flags_windows_msvc if target_abi == "msvc" else make_link_flags_windows_gnu
|
||
|
|
- get_lib_name = get_lib_name_for_windows
|
||
|
|
+ if target_abi == "msvc":
|
||
|
|
+ make_link_flags = _make_link_flags_windows_msvc_direct if use_direct_link_driver else _make_link_flags_windows_msvc_indirect
|
||
|
|
+ get_lib_name = get_lib_name_for_windows
|
||
|
|
+ else:
|
||
|
|
+ make_link_flags = _make_link_flags_windows_gnu_direct if use_direct_link_driver else _make_link_flags_windows_gnu_indirect
|
||
|
|
elif target_os.startswith(("mac", "darwin", "ios")):
|
||
|
|
- make_link_flags_darwin = _make_link_flags_darwin_direct if use_direct_link_driver else _make_link_flags_darwin_indirect
|
||
|
|
- make_link_flags = make_link_flags_darwin
|
||
|
|
- get_lib_name = get_lib_name_default
|
||
|
|
+ make_link_flags = _make_link_flags_darwin_direct if use_direct_link_driver else _make_link_flags_darwin_indirect
|
||
|
|
else:
|
||
|
|
- make_link_flags_default = _make_link_flags_default_direct if use_direct_link_driver else _make_link_flags_default_indirect
|
||
|
|
- make_link_flags = make_link_flags_default
|
||
|
|
- get_lib_name = get_lib_name_default
|
||
|
|
+ make_link_flags = _make_link_flags_default_direct if use_direct_link_driver else _make_link_flags_default_indirect
|
||
|
|
|
||
|
|
return (make_link_flags, get_lib_name)
|
||
|
|
|