Collapse all uses of target.options.foo
into target.foo
with an eye on merging `TargetOptions` into `Target`. `TargetOptions` as a separate structure is mostly an implementation detail of `Target` construction, all its fields logically belong to `Target` and available from `Target` through `Deref` impls.
This commit is contained in:
parent
87a0997ef9
commit
bf66988aa1
48 changed files with 235 additions and 260 deletions
|
@ -743,7 +743,7 @@ pub fn default_configuration(sess: &Session) -> CrateConfig {
|
|||
let vendor = &sess.target.target_vendor;
|
||||
let min_atomic_width = sess.target.min_atomic_width();
|
||||
let max_atomic_width = sess.target.max_atomic_width();
|
||||
let atomic_cas = sess.target.options.atomic_cas;
|
||||
let atomic_cas = sess.target.atomic_cas;
|
||||
let layout = TargetDataLayout::parse(&sess.target).unwrap_or_else(|err| {
|
||||
sess.fatal(&err);
|
||||
});
|
||||
|
@ -752,7 +752,7 @@ pub fn default_configuration(sess: &Session) -> CrateConfig {
|
|||
ret.reserve(6); // the minimum number of insertions
|
||||
// Target bindings.
|
||||
ret.insert((sym::target_os, Some(Symbol::intern(os))));
|
||||
if let Some(ref fam) = sess.target.options.target_family {
|
||||
if let Some(ref fam) = sess.target.target_family {
|
||||
ret.insert((sym::target_family, Some(Symbol::intern(fam))));
|
||||
if fam == "windows" {
|
||||
ret.insert((sym::windows, None));
|
||||
|
@ -765,7 +765,7 @@ pub fn default_configuration(sess: &Session) -> CrateConfig {
|
|||
ret.insert((sym::target_pointer_width, Some(Symbol::intern(&wordsz))));
|
||||
ret.insert((sym::target_env, Some(Symbol::intern(env))));
|
||||
ret.insert((sym::target_vendor, Some(Symbol::intern(vendor))));
|
||||
if sess.target.options.has_elf_tls {
|
||||
if sess.target.has_elf_tls {
|
||||
ret.insert((sym::target_thread_local, None));
|
||||
}
|
||||
for &(i, align) in &[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue