Skip to content

Commit

Permalink
Build libunwind for pc-windows-gnullvm
Browse files Browse the repository at this point in the history
  • Loading branch information
mati865 committed Mar 4, 2024
1 parent 2e3581b commit fd2b23b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/bootstrap/src/core/build_steps/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ fn copy_third_party_objects(
}

if target == "x86_64-fortanix-unknown-sgx"
|| target.contains("pc-windows-gnullvm")
|| builder.config.llvm_libunwind(target) == LlvmLibunwind::InTree
&& (target.contains("linux") || target.contains("fuchsia"))
{
Expand Down
3 changes: 2 additions & 1 deletion src/bootstrap/src/core/build_steps/llvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,7 @@ impl Step for Libunwind {
}

let out_dir = builder.native_dir(self.target).join("libunwind");
let root = builder.src.join("src/llvm-project/libunwind");
let root = builder.src.join("src").join("llvm-project").join("libunwind");

if up_to_date(&root, &out_dir.join("libunwind.a")) {
return out_dir;
Expand Down Expand Up @@ -1271,6 +1271,7 @@ impl Step for Libunwind {
cfg.flag("-fvisibility=hidden");
cfg.define("_LIBUNWIND_DISABLE_VISIBILITY_ANNOTATIONS", None);
cfg.include(root.join("include"));
cfg.include(root.join("src"));
cfg.cargo_metadata(false);
cfg.out_dir(&out_dir);

Expand Down

0 comments on commit fd2b23b

Please sign in to comment.