Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
1c6b4d5
rustc: codegen: Build import library for all windows targets
chouquette May 27, 2019
c1b6716
libstd: windows: compat: Allow use of attributes
chouquette May 27, 2019
863cd6b
bootstrap: Build startup object for all windows-gnu target
chouquette May 27, 2019
e5d7043
std: Link UWP with allowed libraries only
chouquette May 27, 2019
98f9bba
libunwind: Use libunwind when targeting UWP
chouquette May 27, 2019
20eb746
std: rand: Use BCrypt on UWP
chouquette May 27, 2019
0f15466
std: win: Don't use SetHandleInformation on UWP
chouquette May 27, 2019
5466e9f
std: win: Don't expose link() on UWP
chouquette May 27, 2019
b514557
std: win: Don't use GetUserProfileDirectoryW on UWP
chouquette May 27, 2019
07d11ae
std: win: Don't use GetFileInformationByHandle on UWP
chouquette May 27, 2019
a7ad699
std: win: Don't use console APIs on UWP
chouquette May 27, 2019
1a0a263
std: win: Disable stack overflow handling on UWP
chouquette May 27, 2019
1726259
Add UWP targets
chouquette May 27, 2019
9e2714a
Update rustfmt to 1.3.1
topecongiro Jun 30, 2019
0ffb643
Make sure `#[rustc_doc_only_macro]` and other rustc attributes are re…
petrochenkov Jun 29, 2019
e4e7eb2
Feature gate `rustc` attributes harder
petrochenkov Jun 30, 2019
069c52f
Check if the archive has already been added to avoid duplicates
petrhosek Jul 2, 2019
b9344e3
Derive which queries to save using the proc macro
Zoxc Jun 27, 2019
de8bf5b
libstd: windows: Use qualified path for cfg_if
chouquette Jul 3, 2019
848962f
libstd: windows: Use cfg_if instead of NIH ifdef macro
chouquette Jul 3, 2019
096a2a2
libstd: windows: Reindent after last change
chouquette Jul 3, 2019
bb7fbb9
Add separate 'async_closure' feature gate.
Centril Jul 2, 2019
43315bc
Adjust tests wrt. 'async_closure' feature gate.
Centril Jul 2, 2019
3eef0cb
Reduce reliance on feature(await_macro).
Centril Jul 3, 2019
71b4b46
Rollup merge of #60260 - videolabs:rust_uwp2, r=alexcrichton
Centril Jul 4, 2019
0668f38
Rollup merge of #62133 - petrochenkov:norustc, r=eddyb
Centril Jul 4, 2019
4bd46d1
Rollup merge of #62169 - Zoxc:store-query-results, r=eddyb
Centril Jul 4, 2019
bba6a13
Rollup merge of #62244 - topecongiro:rustfmt-1.3.1, r=alexcrichton
Centril Jul 4, 2019
f045805
Rollup merge of #62286 - petrhosek:rustc-no-duplicate-archives, r=cra…
Centril Jul 4, 2019
566909b
Rollup merge of #62292 - Centril:split-async-closures, r=cramertj
Centril Jul 4, 2019
a0493aa
Rollup merge of #62324 - Centril:reduce-await-macro-reliance, r=cramertj
Centril Jul 4, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
rustc: codegen: Build import library for all windows targets
So far it is assumed that using a DLL as a -l parameter argument is ok,
but the assumption doesn't hold when compiling the native code with
llvm.
In which case, an import library is required, so let's build one
This also requires the cargo counterpart to add the import library in
the stamp files, at least when compiling libstd. Otherwise, the files
don't get uplifted
  • Loading branch information
chouquette committed Jun 25, 2019
commit 1c6b4d546dc1a7118cc3a9e940ae98f2a342f34a
1 change: 1 addition & 0 deletions src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1130,6 +1130,7 @@ pub fn run_cargo(builder: &Builder<'_>,
// Skip files like executables
if !filename.ends_with(".rlib") &&
!filename.ends_with(".lib") &&
!filename.ends_with(".a") &&
!is_dylib(&filename) &&
!(is_check && filename.ends_with(".rmeta")) {
continue;
Expand Down
20 changes: 20 additions & 0 deletions src/librustc_codegen_ssa/back/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,26 @@ impl<'a> Linker for GccLinker<'a> {
}
} else {
self.cmd.arg("-shared");
if self.sess.target.target.options.is_like_windows {
// The output filename already contains `dll_suffix` so
// the resulting import library will have a name in the
// form of libfoo.dll.a
let implib_name = out_filename
.file_name()
.and_then(|file| file.to_str())
.map(|file| format!("{}{}{}",
self.sess.target.target.options.staticlib_prefix,
file,
self.sess.target.target.options.staticlib_suffix));
if let Some(implib_name) = implib_name {
let implib = out_filename
.parent()
.map(|dir| dir.join(&implib_name));
if let Some(implib) = implib {
self.linker_arg(&format!("--out-implib,{}", (*implib).to_str().unwrap()));
}
}
}
}
}

Expand Down