put mcpu in comments

This commit is contained in:
Anton-4 2021-11-15 13:43:19 +01:00
parent 030a504bd2
commit 6e23919811
6 changed files with 19 additions and 34 deletions

View file

@ -117,7 +117,7 @@ pub fn build_file<'a>(
.keys() .keys()
.map(|x| x.as_str(&loaded.interns).to_string()) .map(|x| x.as_str(&loaded.interns).to_string())
.collect(), .collect(),
target_valgrind target_valgrind,
); );
// TODO try to move as much of this linking as possible to the precompiled // TODO try to move as much of this linking as possible to the precompiled
@ -290,7 +290,7 @@ fn spawn_rebuild_thread(
binary_path: PathBuf, binary_path: PathBuf,
target: &Triple, target: &Triple,
exported_symbols: Vec<String>, exported_symbols: Vec<String>,
target_valgrind: bool target_valgrind: bool,
) -> std::thread::JoinHandle<u128> { ) -> std::thread::JoinHandle<u128> {
let thread_local_target = target.clone(); let thread_local_target = target.clone();
std::thread::spawn(move || { std::thread::spawn(move || {
@ -311,7 +311,7 @@ fn spawn_rebuild_thread(
&thread_local_target, &thread_local_target,
host_input_path.as_path(), host_input_path.as_path(),
None, None,
target_valgrind target_valgrind,
); );
} }
} }

View file

@ -307,7 +307,7 @@ pub fn build(matches: &ArgMatches, config: BuildConfig) -> io::Result<i32> {
link_type, link_type,
surgically_link, surgically_link,
precompiled, precompiled,
target_valgrind target_valgrind,
); );
match res_binary_path { match res_binary_path {

View file

@ -53,7 +53,6 @@ mod cli_run {
expected_ending: &str, expected_ending: &str,
use_valgrind: bool, use_valgrind: bool,
) { ) {
let mut all_flags = vec![]; let mut all_flags = vec![];
all_flags.extend_from_slice(flags); all_flags.extend_from_slice(flags);

24
cli_utils/Cargo.lock generated
View file

@ -2398,8 +2398,6 @@ name = "roc_build"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"bumpalo", "bumpalo",
"im",
"im-rc",
"inkwell 0.1.0", "inkwell 0.1.0",
"libloading 0.7.1", "libloading 0.7.1",
"roc_builtins", "roc_builtins",
@ -2440,8 +2438,6 @@ name = "roc_can"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"bumpalo", "bumpalo",
"im",
"im-rc",
"roc_builtins", "roc_builtins",
"roc_collections", "roc_collections",
"roc_module", "roc_module",
@ -2459,8 +2455,6 @@ dependencies = [
"bumpalo", "bumpalo",
"clap 3.0.0-beta.5", "clap 3.0.0-beta.5",
"const_format", "const_format",
"im",
"im-rc",
"inkwell 0.1.0", "inkwell 0.1.0",
"libloading 0.7.1", "libloading 0.7.1",
"mimalloc", "mimalloc",
@ -2562,8 +2556,6 @@ dependencies = [
"fs_extra", "fs_extra",
"futures", "futures",
"glyph_brush", "glyph_brush",
"im",
"im-rc",
"libc", "libc",
"log", "log",
"nonempty", "nonempty",
@ -2599,8 +2591,6 @@ name = "roc_fmt"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"bumpalo", "bumpalo",
"im",
"im-rc",
"roc_collections", "roc_collections",
"roc_module", "roc_module",
"roc_parse", "roc_parse",
@ -2612,8 +2602,6 @@ name = "roc_gen_dev"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"bumpalo", "bumpalo",
"im",
"im-rc",
"object 0.26.2", "object 0.26.2",
"roc_builtins", "roc_builtins",
"roc_collections", "roc_collections",
@ -2632,20 +2620,13 @@ name = "roc_gen_llvm"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"bumpalo", "bumpalo",
"im",
"im-rc",
"inkwell 0.1.0", "inkwell 0.1.0",
"morphic_lib", "morphic_lib",
"roc_builtins", "roc_builtins",
"roc_collections", "roc_collections",
"roc_module", "roc_module",
"roc_mono", "roc_mono",
"roc_problem",
"roc_region",
"roc_solve",
"roc_std", "roc_std",
"roc_types",
"roc_unify",
"target-lexicon", "target-lexicon",
] ]
@ -2654,6 +2635,7 @@ name = "roc_gen_wasm"
version = "0.1.0" version = "0.1.0"
dependencies = [ dependencies = [
"bumpalo", "bumpalo",
"roc_builtins",
"roc_collections", "roc_collections",
"roc_module", "roc_module",
"roc_mono", "roc_mono",
@ -2726,7 +2708,6 @@ version = "0.1.0"
dependencies = [ dependencies = [
"bumpalo", "bumpalo",
"hashbrown 0.11.2", "hashbrown 0.11.2",
"linked-hash-map",
"morphic_lib", "morphic_lib",
"roc_can", "roc_can",
"roc_collections", "roc_collections",
@ -2737,7 +2718,6 @@ dependencies = [
"roc_std", "roc_std",
"roc_types", "roc_types",
"roc_unify", "roc_unify",
"ven_ena",
"ven_graph", "ven_graph",
"ven_pretty", "ven_pretty",
] ]
@ -2773,8 +2753,6 @@ version = "0.1.0"
dependencies = [ dependencies = [
"bumpalo", "bumpalo",
"distance", "distance",
"im",
"im-rc",
"roc_can", "roc_can",
"roc_collections", "roc_collections",
"roc_module", "roc_module",

View file

@ -86,7 +86,7 @@ pub fn build_zig_host_native(
target: &str, target: &str,
opt_level: OptLevel, opt_level: OptLevel,
shared_lib_path: Option<&Path>, shared_lib_path: Option<&Path>,
target_valgrind: bool, _target_valgrind: bool,
) -> Output { ) -> Output {
let mut command = Command::new("zig"); let mut command = Command::new("zig");
command command
@ -120,12 +120,13 @@ pub fn build_zig_host_native(
target, target,
]); ]);
if target_valgrind { // use single threaded testing for cli_run and enable this code if valgrind fails with unhandled instruction bytes, see #1963.
/*if target_valgrind {
command.args(&[ command.args(&[
"-mcpu", "-mcpu",
"x86_64" "x86_64"
]); ]);
} }*/
if matches!(opt_level, OptLevel::Optimize) { if matches!(opt_level, OptLevel::Optimize) {
command.args(&["-O", "ReleaseSafe"]); command.args(&["-O", "ReleaseSafe"]);
@ -350,6 +351,7 @@ pub fn rebuild_host(
shared_lib_path: Option<&Path>, shared_lib_path: Option<&Path>,
target_valgrind: bool, target_valgrind: bool,
) { ) {
dbg!("rebuilding host");
let c_host_src = host_input_path.with_file_name("host.c"); let c_host_src = host_input_path.with_file_name("host.c");
let c_host_dest = host_input_path.with_file_name("c_host.o"); let c_host_dest = host_input_path.with_file_name("c_host.o");
let zig_host_src = host_input_path.with_file_name("host.zig"); let zig_host_src = host_input_path.with_file_name("host.zig");
@ -418,7 +420,7 @@ pub fn rebuild_host(
"i386-linux-musl", "i386-linux-musl",
opt_level, opt_level,
shared_lib_path, shared_lib_path,
target_valgrind target_valgrind,
) )
} }
@ -433,7 +435,7 @@ pub fn rebuild_host(
target_triple_str(target), target_triple_str(target),
opt_level, opt_level,
shared_lib_path, shared_lib_path,
target_valgrind target_valgrind,
) )
} }
_ => panic!("Unsupported architecture {:?}", target.architecture), _ => panic!("Unsupported architecture {:?}", target.architecture),

View file

@ -146,7 +146,13 @@ pub fn build_and_preprocess_host(
) -> io::Result<()> { ) -> io::Result<()> {
let dummy_lib = host_input_path.with_file_name("libapp.so"); let dummy_lib = host_input_path.with_file_name("libapp.so");
generate_dynamic_lib(target, exposed_to_host, &dummy_lib)?; generate_dynamic_lib(target, exposed_to_host, &dummy_lib)?;
rebuild_host(opt_level, target, host_input_path, Some(&dummy_lib), target_valgrind); rebuild_host(
opt_level,
target,
host_input_path,
Some(&dummy_lib),
target_valgrind,
);
let dynhost = host_input_path.with_file_name("dynhost"); let dynhost = host_input_path.with_file_name("dynhost");
let metadata = host_input_path.with_file_name("metadata"); let metadata = host_input_path.with_file_name("metadata");
let prehost = host_input_path.with_file_name("preprocessedhost"); let prehost = host_input_path.with_file_name("preprocessedhost");