File tree Expand file tree Collapse file tree 3 files changed +17
-10
lines changed Expand file tree Collapse file tree 3 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ To easily build on windows we can use [MSYS2](http://sourceforge.net/projects/ms
71
71
3 . With that now start ` mingw32_shell.bat ` from where you installed MSYS2 (i.e. ` C:\msys ` ).
72
72
4 . From there just navigate to where you have Rust's source code, configure and build it:
73
73
74
- $ ./configure --build=i686-pc-mingw32
74
+ $ ./configure
75
75
$ make && make install
76
76
77
77
[ repo ] : https://github.com/rust-lang/rust
Original file line number Diff line number Diff line change @@ -299,13 +299,19 @@ case $CFG_OSTYPE in
299
299
CFG_OSTYPE=apple-darwin
300
300
;;
301
301
302
- MINGW32* )
302
+ MINGW* )
303
+ # msys' `uname` does not print gcc configuration, but prints msys
304
+ # configuration. so we cannot believe `uname -m`:
305
+ # msys1 is always i686 and msys2 is always x86_64.
306
+ # instead, msys defines $MSYSTEM which is MINGW32 on i686 and
307
+ # MINGW64 on x86_64.
308
+ CFG_CPUTYPE=i686
303
309
CFG_OSTYPE=pc-mingw32
304
- ;;
305
-
306
- MINGW64 * )
307
- # msys2, MSYSTEM=MINGW64
308
- CFG_OSTYPE=w64-mingw32
310
+ if [ " $MSYSTEM " = MINGW64 ]
311
+ then
312
+ CFG_CPUTYPE=x86_64
313
+ CFG_OSTYPE=w64-mingw32
314
+ fi
309
315
;;
310
316
311
317
# Thad's Cygwin identifers below
Original file line number Diff line number Diff line change 15
15
# msys1/msys2 automatically converts `/abs/path1:/abs/path2` into
16
16
# `c:\real\abs\path1;c:\real\abs\path2` (semicolons) if shell thinks
17
17
# the value is list of paths.
18
+ # (if there is only one path, it becomes `c:/real/abs/path`.)
18
19
# this causes great confusion and error: shell and Makefile doesn't like
19
20
# windows paths so it is really error-prone. revert it for peace.
20
21
def normalize_path (v ):
21
- # c:\path -> /c/path
22
- if ':\\ ' in v :
23
- v = '/' + v .replace (':\\ ' , '/' )
24
22
v = v .replace ('\\ ' , '/' )
23
+ # c:/path -> /c/path
24
+ if ':/' in v :
25
+ v = '/' + v .replace (':/' , '/' )
25
26
return v
26
27
27
28
You can’t perform that action at this time.
0 commit comments