Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upSupport Rust configure when UWP targets are present #195
+146
−9
Conversation
|
r? @asajeffrey |
|
@bors-servo r+ Pity we need this, but sigh, we do. |
|
|
bors-servo
added a commit
that referenced
this pull request
Aug 19, 2019
Support Rust configure when UWP targets are present The existing code that attempts to detect if a given target will allow compiling Rust code assumes that if multiple Rust targets target the same CPU that the triple's OS value will be unique (ie. x86_64-pc-windows-msvc vs. x86_64-pc-windows-gnu). This is no longer true with the introduction of x86_64-uwp-windows-msvc, but it's not enough to include the vendor string in the checks - the configure script is passed a different target (x86_64-windows-mingw32), and the python configuration code needs to reverse-engineer a Rust triple from it to use when compiling Rust code as part of the mozjs build. We bypass this issue by storing the target and host triples that Cargo makes available in the build script and using those value when the python configuration heuristics fail. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/mozjs/195) <!-- Reviewable:end -->
|
|
|
|
Yay, my changes work with nightly rustc but fail with stable and beta. More fiddling is required. |
|
@bors-servo r=asajeffrey |
|
|
bors-servo
added a commit
that referenced
this pull request
Aug 21, 2019
Support Rust configure when UWP targets are present The existing code that attempts to detect if a given target will allow compiling Rust code assumes that if multiple Rust targets target the same CPU that the triple's OS value will be unique (ie. x86_64-pc-windows-msvc vs. x86_64-pc-windows-gnu). This is no longer true with the introduction of x86_64-uwp-windows-msvc, but it's not enough to include the vendor string in the checks - the configure script is passed a different target (x86_64-windows-mingw32), and the python configuration code needs to reverse-engineer a Rust triple from it to use when compiling Rust code as part of the mozjs build. We bypass this issue by storing the target and host triples that Cargo makes available in the build script and using those value when the python configuration heuristics fail. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/mozjs/195) <!-- Reviewable:end -->
|
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
jdm commentedAug 19, 2019
•
edited by larsbergstrom
The existing code that attempts to detect if a given target will allow compiling Rust code assumes that if multiple Rust targets target the same CPU that the triple's OS value will be unique (ie. x86_64-pc-windows-msvc vs. x86_64-pc-windows-gnu). This is no longer true with the introduction of x86_64-uwp-windows-msvc, but it's not enough to include the vendor string in the checks - the configure script is passed a different target (x86_64-windows-mingw32), and the python configuration code needs to reverse-engineer a Rust triple from it to use when compiling Rust code as part of the mozjs build. We bypass this issue by storing the target and host triples that Cargo makes available in the build script and using those value when the python configuration heuristics fail.
This change is