about summary refs log tree commit diff
path: root/compiler/rustc_target/src/spec/msvc_base.rs
AgeCommit message (Collapse)AuthorLines
2023-11-08target: move base specs to spec/baseDavid Wood-26/+0
Signed-off-by: David Wood <david@davidtw.co>
2023-03-29Support TLS access into dylibs on WindowsJohn Kåre Alsaker-0/+1
2022-10-06rustc_target: Refactor internal linker flavorsVadim Petrochenkov-5/+3
In accordance with the design from https://github.com/rust-lang/rust/pull/96827#issuecomment-1208441595
2022-08-27Set DebuginfoKind::Pdb in msvc_baseNicholas Bishop-1/+2
This PDB setting was added to `windows_msvc_base` in https://github.com/rust-lang/rust/pull/98051. It's also needed for the UEFI targets, and since `uefi_msvc_base` and `windows_msvc_base` are the only things that inherit from `msvc_base`, just move the PDB setting up to `mscv_base` to cover both. Fixes https://github.com/rust-lang/rust/issues/101071
2022-08-18session: stabilize split debuginfo on linuxDavid Wood-0/+2
Stabilize the `-Csplit-debuginfo` flag... - ...on Linux for all values of the flag. Split DWARF has been implemented for a few months, hasn't had any bug reports and has had some promising benchmarking for incremental debug build performance. - ..on other platforms for the default value. It doesn't make any sense that `-Csplit-debuginfo=packed` is unstable on Windows MSVC when that's the default behaviour, but keep the other values unstable. Signed-off-by: David Wood <david.wood@huawei.com>
2022-07-11rustc_target: Flip the default for `TargetOptions::executables` to trueVadim Petrochenkov-1/+0
Also change `executables` to true for linux-kernel and windows-uwp-gnu targets
2022-06-25rustc_target: Add convenience functions for adding linker argumentsVadim Petrochenkov-9/+4
They ensure that lld and non-lld linker flavors get the same set of arguments
2022-04-03Replace every `String` in Target(Options) with `Cow<'static, str>`Loïc BRANSTETT-1/+1
2021-05-20Swap TargetOptions::linker_is_gnu default from false to true and update ↵Luqman Aden-0/+1
targets as appropriate.
2021-03-28linker: Use data execution prevention options by default when linker ↵Vadim Petrochenkov-7/+0
supports them
2021-01-28rustc: Stabilize `-Zrun-dsymutil` as `-Csplit-debuginfo`Alex Crichton-1/+5
This commit adds a new stable codegen option to rustc, `-Csplit-debuginfo`. The old `-Zrun-dsymutil` flag is deleted and now subsumed by this stable flag. Additionally `-Zsplit-dwarf` is also subsumed by this flag but still requires `-Zunstable-options` to actually activate. The `-Csplit-debuginfo` flag takes one of three values: * `off` - This indicates that split-debuginfo from the final artifact is not desired. This is not supported on Windows and is the default on Unix platforms except macOS. On macOS this means that `dsymutil` is not executed. * `packed` - This means that debuginfo is desired in one location separate from the main executable. This is the default on Windows (`*.pdb`) and macOS (`*.dSYM`). On other Unix platforms this subsumes `-Zsplit-dwarf=single` and produces a `*.dwp` file. * `unpacked` - This means that debuginfo will be roughly equivalent to object files, meaning that it's throughout the build directory rather than in one location (often the fastest for local development). This is not the default on any platform and is not supported on Windows. Each target can indicate its own default preference for how debuginfo is handled. Almost all platforms default to `off` except for Windows and macOS which default to `packed` for historical reasons. Some equivalencies for previous unstable flags with the new flags are: * `-Zrun-dsymutil=yes` -> `-Csplit-debuginfo=packed` * `-Zrun-dsymutil=no` -> `-Csplit-debuginfo=unpacked` * `-Zsplit-dwarf=single` -> `-Csplit-debuginfo=packed` * `-Zsplit-dwarf=split` -> `-Csplit-debuginfo=unpacked` Note that `-Csplit-debuginfo` still requires `-Zunstable-options` for non-macOS platforms since split-dwarf support was *just* implemented in rustc. There's some more rationale listed on #79361, but the main gist of the motivation for this commit is that `dsymutil` can take quite a long time to execute in debug builds and provides little benefit. This means that incremental compile times appear that much worse on macOS because the compiler is constantly running `dsymutil` over every single binary it produces during `cargo build` (even build scripts!). Ideally rustc would switch to not running `dsymutil` by default, but that's a problem left to get tackled another day. Closes #79361
2020-11-07rustc_target: Move `linker_flavor` from `Target` to `TargetOptions`Vadim Petrochenkov-0/+1
2020-08-30mv compiler to compiler/mark-0/+31