Skip to content

Commit b54f43a

Browse files
author
Ariel Ben-Yehuda
authored
Rollup merge of rust-lang#46280 - tamird:remove-old-refs, r=alexcrichton
rustc_llvm: remove stale references ...that were removed in 77c3bfa. r? @alexcrichton
2 parents bcfab94 + 94d02b8 commit b54f43a

File tree

7 files changed

+15
-20
lines changed

7 files changed

+15
-20
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ config.stamp
9595
keywords.md
9696
lexer.ml
9797
src/etc/dl
98-
src/librustc_llvm/llvmdeps.rs
9998
tmp.*.rs
10099
version.md
101100
version.ml

src/bootstrap/native.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ impl Step for TestHelpers {
316316
.warnings(false)
317317
.debug(false)
318318
.file(build.src.join("src/rt/rust_test_helpers.c"))
319-
.compile("librust_test_helpers.a");
319+
.compile("rust_test_helpers");
320320
}
321321
}
322322

src/liballoc_jemalloc/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,6 @@ fn main() {
140140
cc::Build::new()
141141
.flag("-fvisibility=hidden")
142142
.file("pthread_atfork_dummy.c")
143-
.compile("libpthread_atfork_dummy.a");
143+
.compile("pthread_atfork_dummy");
144144
}
145145
}

src/libprofiler_builtins/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,5 +56,5 @@ fn main() {
5656
cfg.file(Path::new("../libcompiler_builtins/compiler-rt/lib/profile").join(src));
5757
}
5858

59-
cfg.compile("libprofiler-rt.a");
59+
cfg.compile("profiler-rt");
6060
}

src/librustc_llvm/build.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,13 @@ fn main() {
154154
}
155155

156156
for component in &components {
157-
let mut flag = String::from("-DLLVM_COMPONENT_");
157+
let mut flag = String::from("LLVM_COMPONENT_");
158158
flag.push_str(&component.to_uppercase());
159-
cfg.flag(&flag);
159+
cfg.define(&flag, None);
160160
}
161161

162162
if env::var_os("LLVM_RUSTLLVM").is_some() {
163-
cfg.flag("-DLLVM_RUSTLLVM");
163+
cfg.define("LLVM_RUSTLLVM", None);
164164
}
165165

166166
build_helper::rerun_if_changed_anything_in_dir(Path::new("../rustllvm"));
@@ -169,7 +169,7 @@ fn main() {
169169
.file("../rustllvm/ArchiveWrapper.cpp")
170170
.cpp(true)
171171
.cpp_link_stdlib(None) // we handle this below
172-
.compile("librustllvm.a");
172+
.compile("rustllvm");
173173

174174
let (llvm_kind, llvm_link_arg) = detect_llvm_link(major, minor, &llvm_config);
175175

src/librustc_llvm/ffi.rs

+7-11
Original file line numberDiff line numberDiff line change
@@ -505,17 +505,13 @@ pub mod debuginfo {
505505

506506
pub enum ModuleBuffer {}
507507

508-
// Link to our native llvm bindings (things that we need to use the C++ api
509-
// for) and because llvm is written in C++ we need to link against libstdc++
510-
//
511-
// You'll probably notice that there is an omission of all LLVM libraries
512-
// from this location. This is because the set of LLVM libraries that we
513-
// link to is mostly defined by LLVM, and the `llvm-config` tool is used to
514-
// figure out the exact set of libraries. To do this, the build system
515-
// generates an llvmdeps.rs file next to this one which will be
516-
// automatically updated whenever LLVM is updated to include an up-to-date
517-
// set of the libraries we need to link to LLVM for.
518-
#[link(name = "rustllvm", kind = "static")] // not quite true but good enough
508+
// This annotation is primarily needed for MSVC where attributes like
509+
// dllimport/dllexport are applied and need to be correct for everything to
510+
// link successfully. The #[link] annotation here says "these symbols are
511+
// included statically" which means that they're all exported with dllexport
512+
// and from the rustc_llvm dynamic library. Otherwise the rustc_trans dynamic
513+
// library would not be able to access these symbols.
514+
#[link(name = "rustllvm", kind = "static")]
519515
extern "C" {
520516
// Create and destroy contexts.
521517
pub fn LLVMContextCreate() -> ContextRef;

src/librustdoc/build.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ fn main() {
2727
.warnings(false)
2828
.include(src_dir)
2929
.warnings(false)
30-
.compile("libhoedown.a");
30+
.compile("hoedown");
3131
}
3232

0 commit comments

Comments
 (0)