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()
.map(|x| x.as_str(&loaded.interns).to_string())
.collect(),
target_valgrind
target_valgrind,
);
// 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,
target: &Triple,
exported_symbols: Vec<String>,
target_valgrind: bool
target_valgrind: bool,
) -> std::thread::JoinHandle<u128> {
let thread_local_target = target.clone();
std::thread::spawn(move || {
@ -311,7 +311,7 @@ fn spawn_rebuild_thread(
&thread_local_target,
host_input_path.as_path(),
None,
target_valgrind
target_valgrind,
);
}
}

View file

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

View file

@ -53,7 +53,6 @@ mod cli_run {
expected_ending: &str,
use_valgrind: bool,
) {
let mut all_flags = vec![];
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"
dependencies = [
"bumpalo",
"im",
"im-rc",
"inkwell 0.1.0",
"libloading 0.7.1",
"roc_builtins",
@ -2440,8 +2438,6 @@ name = "roc_can"
version = "0.1.0"
dependencies = [
"bumpalo",
"im",
"im-rc",
"roc_builtins",
"roc_collections",
"roc_module",
@ -2459,8 +2455,6 @@ dependencies = [
"bumpalo",
"clap 3.0.0-beta.5",
"const_format",
"im",
"im-rc",
"inkwell 0.1.0",
"libloading 0.7.1",
"mimalloc",
@ -2562,8 +2556,6 @@ dependencies = [
"fs_extra",
"futures",
"glyph_brush",
"im",
"im-rc",
"libc",
"log",
"nonempty",
@ -2599,8 +2591,6 @@ name = "roc_fmt"
version = "0.1.0"
dependencies = [
"bumpalo",
"im",
"im-rc",
"roc_collections",
"roc_module",
"roc_parse",
@ -2612,8 +2602,6 @@ name = "roc_gen_dev"
version = "0.1.0"
dependencies = [
"bumpalo",
"im",
"im-rc",
"object 0.26.2",
"roc_builtins",
"roc_collections",
@ -2632,20 +2620,13 @@ name = "roc_gen_llvm"
version = "0.1.0"
dependencies = [
"bumpalo",
"im",
"im-rc",
"inkwell 0.1.0",
"morphic_lib",
"roc_builtins",
"roc_collections",
"roc_module",
"roc_mono",
"roc_problem",
"roc_region",
"roc_solve",
"roc_std",
"roc_types",
"roc_unify",
"target-lexicon",
]
@ -2654,6 +2635,7 @@ name = "roc_gen_wasm"
version = "0.1.0"
dependencies = [
"bumpalo",
"roc_builtins",
"roc_collections",
"roc_module",
"roc_mono",
@ -2726,7 +2708,6 @@ version = "0.1.0"
dependencies = [
"bumpalo",
"hashbrown 0.11.2",
"linked-hash-map",
"morphic_lib",
"roc_can",
"roc_collections",
@ -2737,7 +2718,6 @@ dependencies = [
"roc_std",
"roc_types",
"roc_unify",
"ven_ena",
"ven_graph",
"ven_pretty",
]
@ -2773,8 +2753,6 @@ version = "0.1.0"
dependencies = [
"bumpalo",
"distance",
"im",
"im-rc",
"roc_can",
"roc_collections",
"roc_module",

View file

@ -86,7 +86,7 @@ pub fn build_zig_host_native(
target: &str,
opt_level: OptLevel,
shared_lib_path: Option<&Path>,
target_valgrind: bool,
_target_valgrind: bool,
) -> Output {
let mut command = Command::new("zig");
command
@ -120,12 +120,13 @@ pub fn build_zig_host_native(
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(&[
"-mcpu",
"x86_64"
]);
}
}*/
if matches!(opt_level, OptLevel::Optimize) {
command.args(&["-O", "ReleaseSafe"]);
@ -350,6 +351,7 @@ pub fn rebuild_host(
shared_lib_path: Option<&Path>,
target_valgrind: bool,
) {
dbg!("rebuilding host");
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 zig_host_src = host_input_path.with_file_name("host.zig");
@ -418,7 +420,7 @@ pub fn rebuild_host(
"i386-linux-musl",
opt_level,
shared_lib_path,
target_valgrind
target_valgrind,
)
}
@ -433,7 +435,7 @@ pub fn rebuild_host(
target_triple_str(target),
opt_level,
shared_lib_path,
target_valgrind
target_valgrind,
)
}
_ => panic!("Unsupported architecture {:?}", target.architecture),

View file

@ -146,7 +146,13 @@ pub fn build_and_preprocess_host(
) -> io::Result<()> {
let dummy_lib = host_input_path.with_file_name("libapp.so");
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 metadata = host_input_path.with_file_name("metadata");
let prehost = host_input_path.with_file_name("preprocessedhost");