Merge #4166
4166: Defining a default target to support cross-compilation targets r=matklad a=FuriouZz Related to #4163 Co-authored-by: Christophe MASSOLIN <christophe.massolin@gmail.com>
This commit is contained in:
@@ -149,7 +149,7 @@ pub(crate) fn load(
|
||||
|
||||
// FIXME: cfg options?
|
||||
let default_cfg_options = {
|
||||
let mut opts = get_rustc_cfg_options();
|
||||
let mut opts = get_rustc_cfg_options(None);
|
||||
opts.insert_atom("test".into());
|
||||
opts.insert_atom("debug_assertion".into());
|
||||
opts
|
||||
|
||||
@@ -131,6 +131,7 @@ impl Config {
|
||||
set(value, "/cargo/allFeatures", &mut self.cargo.all_features);
|
||||
set(value, "/cargo/features", &mut self.cargo.features);
|
||||
set(value, "/cargo/loadOutDirsFromCheck", &mut self.cargo.load_out_dirs_from_check);
|
||||
set(value, "/cargo/target", &mut self.cargo.target);
|
||||
|
||||
match get(value, "/procMacro/enable") {
|
||||
Some(true) => {
|
||||
|
||||
@@ -131,7 +131,7 @@ impl WorldState {
|
||||
|
||||
// FIXME: Read default cfgs from config
|
||||
let default_cfg_options = {
|
||||
let mut opts = get_rustc_cfg_options();
|
||||
let mut opts = get_rustc_cfg_options(config.cargo.target.as_ref());
|
||||
opts.insert_atom("test".into());
|
||||
opts.insert_atom("debug_assertion".into());
|
||||
opts
|
||||
|
||||
Reference in New Issue
Block a user