Remove support for self-opening
This was only used for linkage test cases, which is already covered by
the [run-make-fulldeps/symbol-visibility test](https://github.com/rust-lang/rust/blob/master/src/test/run-make-fulldeps/symbol-visibility/Makefile) -- which fairly extensively makes
sure we're correctly exporting the right symbols at the right visibility (for
various Rust crate types).
This fixes#10379 and resolves#10356 by removing the test case (and underlying support in the compiler). AFAICT, the better way to test visibility is via nm, like the symbol visibility test. It seems like that's sufficient; I suspect that given that we don't use this we should just drop it (android is tier 2 anyway). But happy to hear otherwise.
The referenced `sanitizer-address/Makefile` no longer exists, so perhaps these options are no longer necessary as well.
Even if they are still necessary, they should use `-C relocation-model=static` instead.
This was only used for linkage test cases, which is already covered by
the run-make-fulldeps/symbol-visibility test -- which fairly extensively makes
sure we're correctly exporting the right symbols at the right visibility (for
various Rust crate types).
Rollup of 5 pull requests
Successful merges:
- #70644 (Clean up `ModuleConfig` initialization)
- #70937 (Fix staticlib name for *-pc-windows-gnu targets)
- #70996 (Add or_insert_with_key to Entry of HashMap/BTreeMap)
- #71020 (Store UNICODE_VERSION as a tuple)
- #71021 (Use write!-style syntax for MIR assert terminator)
Failed merges:
r? @ghost
Remove `no_integrated_as` mode.
Specifically, remove both `-Z no_integrated_as` and
`TargetOptions::no_integrated_as`. The latter was only used for the
`msp430_none_elf` platform, for which it's no longer required.
r? @alexcrichton
Specifically, remove both `-Z no_integrated_as` and
`TargetOptions::no_integrated_as`. The latter was only used for the
`msp430_none_elf` platform, for which it's no longer required.
Prepare for LLVM 10 upgrade
This is #67759 minus the submodule update.
* Fix two compatibility issues in the rustllvm wrapper.
* Update data layout strings in tests.
* Fix LLVM version comparison (this become a problem because the major version has two digits now).
r? @cuviper
This is a minimal regression test for the issue #68794: "TEXTREL in
i686", which was fixed with e86019c4a0.
The test links a minimal rust static library into a shared library, and
checks that the linker didn't have to add the TEXTREL flag.
One calls into C functions passing non-c-like enumerations by
value. The other calls into C expecting non-C-like enumerations as
returns.
These test cases are based on the tests provided by @bitwalker on
issue #68190. The original tests were provided at:
2688d5c672
rustc: Allow cdylibs to link against dylibs
Previously, rustc mandated that cdylibs could only link against rlibs as dependencies (not dylibs).
This commit disables that restriction and tests that it works in a simple case.
I don't have a windows rustc dev environment, so I guessed at the MSVC test code, I'm hoping the CI can run that for me.
Additionally, we might want to consider emitting (through cargo or rustc) some metadata to help C users of a cdylib figure out where all the dylibs they need are. I don't think that should be needed to land this change, as it will still be usable by homogeneous build systems without it.
My new test was templated off the `tests/run-make-fulldeps/cdylib` test. It seemed more appropriate to have it as a separate test, since both foo.rs and bar.rs would need to be replicated to make that test cover both cases, but I can do that if it would be preferred.
If I'm doing anything out of order/process, please let me know; this is only my second change to rustc and the prior one was trivial.
r? alexcrichton
Previously, rustc mandated that cdylibs could only link against rlibs as
dependencies (not dylibs).
This commit disables that restriction and tests that it works in a
simple case.
* Move tests from src/test/run-make-fulldeps to src/test/ui.
* Fix memory sanitizer test to detect the intended issue rather than
an unrelated one caused by the use of an uninstrumented std.
Enable leak sanitizer test case
* Use `black_box` to avoid memory leak removal during optimization.
* Leak multiple objects to make test case more robust.
Clean up some diagnostics by making them more consistent
In general:
- Diagnostic should start with a lowercase letter.
- Diagnostics should not end with a full stop.
- Ellipses contain three dots.
- Backticks should encode Rust code.
I also reworded a couple of messages to make them read more clearly.
It might be sensible to create a style guide for diagnostics, so these informal conventions are written down somewhere, after which we could audit the existing diagnostics.
r? @Centril