Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @eddyb (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
|
r? @brson |
| name.to_string() | ||
| } | ||
|
|
||
| #[cfg(windows)] |
There was a problem hiding this comment.
Instead of #[cfg], could this use cfg! perhaps to get type checking everywhere? Something like:
pub fn cmd(name: &str) -> String {
if cfg!(windows) {
format!("{}.bat", name)
} else {
name.to_string()
}
}|
Thank you so much for helping with emscripten support @schulzch ! I think this is the right thing to do for now, but I think it's also incorrect because it makes the emscripten target spec conditional on the host platform, which I do not think is appropriate. I'm not sure the best solution. @bors r+ |
|
📌 Commit 14994ac has been approved by |
|
⌛ Testing commit 14994ac with merge b68d329... |
Partial fix for #38489. Fixes script name resolution for windows by invoking `emcc.bat` instead of `emcc`, etc. Remaining issue: ``` Traceback (most recent call last): File "C:\Program Files\Emscripten\emscripten\1.35.0\\emcc", line 1309, in <module> final = shared.Building.llvm_opt(final, link_opts, DEFAULT_FINAL) File "C:\Program Files\Emscripten\emscripten\1.35.0\tools\shared.py", line 1471, in llvm_opt assert os.path.exists(target), 'Failed to run llvm optimizations: ' + output AssertionError: Failed to run llvm optimizations: ```
|
☀️ Test successful - status-appveyor, status-travis |
Fixes script name resolution for windows by invoking
emcc.batinstead ofemcc, etc.Remaining issue: