Skip to content

Two Windows fixes #16691

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

Merged
merged 2 commits into from
Aug 24, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ To easily build on windows we can use [MSYS2](http://sourceforge.net/projects/ms
3. With that now start `mingw32_shell.bat` from where you installed MSYS2 (i.e. `C:\msys`).
4. From there just navigate to where you have Rust's source code, configure and build it:

$ ./configure --build=i686-pc-mingw32
$ ./configure
$ make && make install

[repo]: https://github.com/rust-lang/rust
Expand Down
18 changes: 12 additions & 6 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -299,13 +299,19 @@ case $CFG_OSTYPE in
CFG_OSTYPE=apple-darwin
;;

MINGW32*)
MINGW*)
# msys' `uname` does not print gcc configuration, but prints msys
# configuration. so we cannot believe `uname -m`:
# msys1 is always i686 and msys2 is always x86_64.
# instead, msys defines $MSYSTEM which is MINGW32 on i686 and
# MINGW64 on x86_64.
CFG_CPUTYPE=i686
CFG_OSTYPE=pc-mingw32
;;

MINGW64*)
# msys2, MSYSTEM=MINGW64
CFG_OSTYPE=w64-mingw32
if [ "$MSYSTEM" = MINGW64 ]
then
CFG_CPUTYPE=x86_64
CFG_OSTYPE=w64-mingw32
fi
;;

# Thad's Cygwin identifers below
Expand Down
7 changes: 4 additions & 3 deletions src/etc/maketest.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@
# msys1/msys2 automatically converts `/abs/path1:/abs/path2` into
# `c:\real\abs\path1;c:\real\abs\path2` (semicolons) if shell thinks
# the value is list of paths.
# (if there is only one path, it becomes `c:/real/abs/path`.)
# this causes great confusion and error: shell and Makefile doesn't like
# windows paths so it is really error-prone. revert it for peace.
def normalize_path(v):
# c:\path -> /c/path
if ':\\' in v:
v = '/' + v.replace(':\\', '/')
v = v.replace('\\', '/')
# c:/path -> /c/path
if ':/' in v:
v = '/' + v.replace(':/', '/')
return v


Expand Down