mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-23 23:08:14 +00:00
build(core): do not link gen_context.o to trezor_lib
This commit is contained in:
parent
17b3c9a7db
commit
a924bd4dc6
@ -190,8 +190,9 @@ fn link_core_objects() {
|
||||
let crate_path = env::var("CARGO_MANIFEST_DIR").unwrap();
|
||||
let build_path = format!("{}/../../build/unix", crate_path);
|
||||
|
||||
// List of object filenames to ignore in the `embed` directory.
|
||||
// List of object filenames to ignore in the `embed` and `vendor` directory
|
||||
let embed_blocklist = [OsStr::new("main_main.o")];
|
||||
let vendor_blocklist = [OsStr::new("gen_context.o")];
|
||||
|
||||
// Collect all objects that the `core` library uses, and link it in. We have to
|
||||
// make sure to avoid the object with the `_main` symbol, so we don't get any
|
||||
@ -205,8 +206,14 @@ fn link_core_objects() {
|
||||
cc.object(obj);
|
||||
}
|
||||
}
|
||||
|
||||
for obj in glob::glob(&format!("{}/vendor/**/*.o", build_path)).unwrap() {
|
||||
cc.object(obj.unwrap());
|
||||
let obj = obj.unwrap();
|
||||
if vendor_blocklist.contains(&obj.file_name().unwrap()) {
|
||||
// Ignore.
|
||||
} else {
|
||||
cc.object(obj);
|
||||
}
|
||||
}
|
||||
|
||||
// Compile all the objects into a static library and link it in automatically.
|
||||
|
Loading…
Reference in New Issue
Block a user