Skip to content

Commit

Permalink
feat: optimize linker output on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
edg-l committed Feb 19, 2024
1 parent d924305 commit 4a5ca4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/edlang_codegen_llvm/src/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pub fn link_shared_lib(
"-L/lib/../lib64",
"-L/usr/lib/../lib64",
"-lc",
"-O1",
&input_path.display().to_string(),
]
}
Expand Down Expand Up @@ -102,6 +103,7 @@ pub fn link_binary(
"-zrelro",
"--no-as-needed",
"-lc",
"-O1",
crtn,
&input_path.display().to_string(),
]
Expand Down
1 change: 0 additions & 1 deletion lib/edlang_driver/tests/programs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ mod common;
#[test_case(TEST_IF_NO_ELSE, "TEST_IF_NO_ELSE", false, 1, &[] ; "TEST_IF_NO_ELSE")]
#[test_case(TEST_IF_NO_ELSE, "TEST_IF_NO_ELSE", false, 2, &["a"] ; "TEST_IF_NO_ELSE args")]
fn example_tests(source: &str, name: &str, is_library: bool, status_code: i32, args: &[&str]) {
dbg!(source);
let program = compile_program(source, name, is_library).unwrap();

assert!(program.binary_file.exists(), "program not compiled");
Expand Down

0 comments on commit 4a5ca4a

Please sign in to comment.