Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscellaneous Windows-related fixes in the compiler #9054

Merged
merged 2 commits into from Apr 16, 2020

Conversation

oprypin
Copy link
Member

@oprypin oprypin commented Apr 13, 2020

  • Temporary file needs .exe extension to be executable
  • Replacing '/' is not enough to sanitize a filename, use Path splitting and replace the drive ':' manually
  • Split PATH by the correct delimiter
  • Don't try to fork (n_threads=1)
  • Don't try to set a directory's mtime on Windows, it errors
  • Don't rely on an external date command to get current date, use macro run instead
  • Remove custom abs-path code that is already handled by expand_path
  • Correct string interpolation in ECR
  • Allow overriding llvm-config --targets-built because the host LLVM doesn't necessarily match target LLVM
  • Skip signal code

Unrelated: handle non-exit non-signal exit statuses correctly on POSIX.

* Temporary file needs .exe extension to be executable
* Replacing '/' is not enough to sanitize a filename, use Path splitting and replace the drive ':' manually
* Split PATH by the correct delimiter
* Don't try to fork (n_threads=1)
* Don't try to set a directory's mtime on Windows, it errors
* Don't rely on an external `date` command to get current date, use macro run instead
* Remove custom abs-path code that is already handled by expand_path
* Correct string interpolation in ECR
* Allow overriding `llvm-config --targets-built` because the host LLVM doesn't necessarily match target LLVM
* Skip signal code

Unrelated: handle non-exit non-signal exit statuses correctly on POSIX.
@oprypin
Copy link
Member Author

oprypin commented Apr 15, 2020

This PR is ready, it's not waiting on any macro additions.
I can undo the change to macro run, it's not absolutely necessary.

Copy link
Member

@straight-shoota straight-shoota left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'd prefer to keep the change to SOURCE_DATE_EPOCH out of this. As long as the env var is set, the command won't be executed, so there's nothing stopping this to work on windows.

@straight-shoota straight-shoota merged commit 47f3432 into crystal-lang:master Apr 16, 2020
@straight-shoota
Copy link
Member

Thank you @oprypin

carlhoerberg pushed a commit to carlhoerberg/crystal that referenced this pull request Apr 29, 2020
* Temporary file needs .exe extension to be executable
* Replacing '/' is not enough to sanitize a filename, use Path splitting and replace the drive ':' manually
* Split PATH by the correct delimiter
* Don't try to fork (n_threads=1)
* Don't try to set a directory's mtime on Windows, it errors
* Remove custom abs-path code that is already handled by expand_path
* Correct string interpolation in ECR
* Allow overriding `llvm-config --targets-built` because the host LLVM doesn't necessarily match target LLVM
* Skip signal code

Unrelated: handle non-exit non-signal exit statuses correctly on POSIX.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants