diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2019-01-16 14:37:22 +0100 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2019-01-16 14:37:22 +0100 |
| commit | 7bddcbae51b9417b9054ea042174416d8f538405 (patch) | |
| tree | 9fa35b998b995b9f77d8e6a98769a8d53e5103f0 /src/rustllvm/RustWrapper.cpp | |
| parent | e2f221c75932de7a29845c8d6f1f73536ad00c41 (diff) | |
| download | rust-7bddcbae51b9417b9054ea042174416d8f538405.tar.gz rust-7bddcbae51b9417b9054ea042174416d8f538405.zip | |
With this change, I am able to build and test cross-platform `rustc`
In particular, I can use the following in my `config.toml`: ``` [build] host = ["i686-unknown-linux-gnu", "x86_64-unknown-linux-gnu"] target = ["i686-unknown-linux-gnu", "x86_64-unknown-linux-gnu"] ``` Before this change, my attempt to run the test suite would fail because the error output differs depending on what your host and targets are. ---- To be concrete, here are the actual messages one can observe: ``` % ./build/x86_64-unknown-linux-gnu/stage1/bin/rustc ../src/test/ui/huge-enum.rs -Aunused --target=x86_64-unknown-linux-gnu error: the type `std::option::Option<[u32; 35184372088831]>` is too big for the current architecture error: aborting due to previous error % ./build/x86_64-unknown-linux-gnu/stage1/bin/rustc ../src/test/ui/huge-enum.rs -Aunused --target=i686-unknown-linux-gnu error: the type `std::option::Option<[u32; 536870911]>` is too big for the current architecture error: aborting due to previous error % ./build/i686-unknown-linux-gnu/stage1/bin/rustc ../src/test/ui/huge-enum.rs -Aunused --target=i686-unknown-linux-gnu error: the type `std::option::Option<[u32; 536870911]>` is too big for the current architecture error: aborting due to previous error % ./build/i686-unknown-linux-gnu/stage1/bin/rustc ../src/test/ui/huge-enum.rs -Aunused --target=x86_64-unknown-linux-gnu error: the type `[u32; 35184372088831]` is too big for the current architecture error: aborting due to previous error ``` To address these variations, I changed the test to be more aggressive in its normalization strategy. We cannot (and IMO should not) guarantee that `Option` will appear in the error output here. So I normalized both types `Option<[u32; N]>` and `[u32; N]` to just `TYPE`
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
