about summary refs log tree commit diff
path: root/compiler/rustc_session/src/utils.rs
diff options
context:
space:
mode:
authorDaniil Belov <belov.dv@phystech.edu>2022-07-19 12:00:28 +0300
committerDaniil Belov <belov.dv@phystech.edu>2022-07-26 13:55:27 +0300
commit7d4a98e61aef8622ab4fa0cec0810171cf17b1bf (patch)
tree5b86a093fccc2504f4fc907569eec38055c9ffc6 /compiler/rustc_session/src/utils.rs
parent9ed0bf9f2bd63933785fb8a380c177d2d70e88ec (diff)
downloadrust-7d4a98e61aef8622ab4fa0cec0810171cf17b1bf.tar.gz
rust-7d4a98e61aef8622ab4fa0cec0810171cf17b1bf.zip
Lib kind -l link-arg:
arbitrary link argument like -C link-arg, but respecting relative order to other `-l` options, unstable
Diffstat (limited to 'compiler/rustc_session/src/utils.rs')
-rw-r--r--compiler/rustc_session/src/utils.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_session/src/utils.rs b/compiler/rustc_session/src/utils.rs
index bda7b314308..9a4f6f9f9ef 100644
--- a/compiler/rustc_session/src/utils.rs
+++ b/compiler/rustc_session/src/utils.rs
@@ -34,6 +34,9 @@ pub enum NativeLibKind {
         /// Whether the framework will be linked only if it satisfies some undefined symbols
         as_needed: Option<bool>,
     },
+    /// Argument which is passed to linker, relative order with libraries and other arguments
+    /// is preserved
+    LinkArg,
     /// The library kind wasn't specified, `Dylib` is currently used as a default.
     Unspecified,
 }
@@ -47,7 +50,7 @@ impl NativeLibKind {
             NativeLibKind::Dylib { as_needed } | NativeLibKind::Framework { as_needed } => {
                 as_needed.is_some()
             }
-            NativeLibKind::RawDylib | NativeLibKind::Unspecified => false,
+            NativeLibKind::RawDylib | NativeLibKind::Unspecified | NativeLibKind::LinkArg => false,
         }
     }
 }