File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -822,9 +822,10 @@ pub fn link_binary(sess: Session,
822
822
// In the future, FreeBSD will use clang as default compiler.
823
823
// It would be flexible to use cc (system's default C compiler)
824
824
// instead of hard-coded gcc.
825
- // For win32, there is no cc command,
826
- // so we add a condition to make it use gcc.
827
- let cc_prog: ~str = match sess. opts . linker {
825
+ // For win32, there is no cc command, so we add a condition to make it use g++.
826
+ // We use g++ rather than gcc because it automatically adds linker options required
827
+ // for generation of dll modules that correctly register stack unwind tables.
828
+ match sess. opts . linker {
828
829
Some ( ref linker) => linker. to_str ( ) ,
829
830
None => match sess. targ_cfg . os {
830
831
session:: os_android =>
@@ -837,7 +838,7 @@ pub fn link_binary(sess: Session,
837
838
(--android-cross-path)")
838
839
}
839
840
} ,
840
- session:: os_win32 => ~"gcc ",
841
+ session:: os_win32 => ~"g++ ",
841
842
_ => ~" cc"
842
843
}
843
844
} ;
You can’t perform that action at this time.
0 commit comments