diff options
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/main.cpp b/src/main.cpp index af999dae..27721cb0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -23,6 +23,7 @@ #include "hir_expand/main_bindings.hpp" #include "mir/main_bindings.hpp" #include "trans/main_bindings.hpp" +#include "trans/target.hpp" #include "expand/cfg.hpp" @@ -175,26 +176,10 @@ int main(int argc, char *argv[]) // Set up cfg values Cfg_SetValue("rust_compiler", "mrustc"); - // TODO: Target spec - Cfg_SetFlag("unix"); - Cfg_SetFlag("linux"); - Cfg_SetValue("target_os", "linux"); - Cfg_SetValue("target_family", "unix"); - Cfg_SetValue("target_pointer_width", "64"); - Cfg_SetValue("target_endian", "little"); - Cfg_SetValue("target_arch", "x86_64"); - Cfg_SetValue("target_env", "gnu"); - Cfg_SetValueCb("target_has_atomic", [](const ::std::string& s) { - if(s == "8") return true; // Has an atomic byte - if(s == "ptr") return true; // Has an atomic pointer-sized value - return false; - }); - Cfg_SetValueCb("target_feature", [](const ::std::string& s) { - return false; - }); Cfg_SetValueCb("feature", [¶ms](const ::std::string& s) { return params.features.count(s) != 0; }); + Target_SetCfg(); if( params.test_harness ) |