@@ -91,14 +91,22 @@ pub struct Target {
91
91
pub struct TargetOptions {
92
92
/// Linker to invoke. Defaults to "cc".
93
93
pub linker : String ,
94
- /// Linker arguments that are unconditionally passed *before* any user-defined libraries.
94
+ /// Linker arguments that are unconditionally passed *before* any
95
+ /// user-defined libraries.
95
96
pub pre_link_args : Vec < String > ,
96
- /// Linker arguments that are unconditionally passed *after* any user-defined libraries.
97
+ /// Linker arguments that are unconditionally passed *after* any
98
+ /// user-defined libraries.
97
99
pub post_link_args : Vec < String > ,
98
- /// Default CPU to pass to LLVM. Corresponds to `llc -mcpu=$cpu`. Defaults to "default".
100
+ /// Objects to link before and after all others, always found within the
101
+ /// sysroot folder.
102
+ pub pre_link_objects : Vec < String > ,
103
+ pub post_link_objects : Vec < String > ,
104
+ /// Default CPU to pass to LLVM. Corresponds to `llc -mcpu=$cpu`. Defaults
105
+ /// to "default".
99
106
pub cpu : String ,
100
- /// Default target features to pass to LLVM. These features will *always* be passed, and cannot
101
- /// be disabled even via `-C`. Corresponds to `llc -mattr=$features`.
107
+ /// Default target features to pass to LLVM. These features will *always* be
108
+ /// passed, and cannot be disabled even via `-C`. Corresponds to `llc
109
+ /// -mattr=$features`.
102
110
pub features : String ,
103
111
/// Whether dynamic linking is available on this target. Defaults to false.
104
112
pub dynamic_linking : bool ,
@@ -183,6 +191,8 @@ impl Default for TargetOptions {
183
191
has_rpath : false ,
184
192
no_compiler_rt : false ,
185
193
position_independent_executables : false ,
194
+ pre_link_objects : Vec :: new ( ) ,
195
+ post_link_objects : Vec :: new ( ) ,
186
196
}
187
197
}
188
198
}
0 commit comments