Apply the makefile changes again, this time fixin the driver to not produce a
rustc.exe.exe.
This commit is contained in:
parent
1cc7165e62
commit
c3015b8952
23
mk/tests.mk
23
mk/tests.mk
|
@ -200,15 +200,13 @@ compile-check: tidy \
|
||||||
@# programs, I\'ll live with the noise.
|
@# programs, I\'ll live with the noise.
|
||||||
-$(Q)$(CFG_DSYMUTIL) $@
|
-$(Q)$(CFG_DSYMUTIL) $@
|
||||||
|
|
||||||
%.stage2$(X): %.stage2.o $(SREQ2)
|
%.stage2$(X): %.rs $(SREQ2)
|
||||||
@$(call E, link [gcc]: $@)
|
@$(call E, compile_and_link: $@)
|
||||||
$(Q)gcc $(CFG_GCCISH_CFLAGS) stage3/glue.o -o $@ $< \
|
$(STAGE2) -o $@ $<
|
||||||
-Lstage3 -Lrt rt/main.o -lrustrt -lstd -lm
|
|
||||||
@# dsymutil sometimes fails or prints a warning, but the
|
|
||||||
@# program still runs. Since it simplifies debugging other
|
|
||||||
@# programs, I\'ll live with the noise.
|
|
||||||
-$(Q)$(CFG_DSYMUTIL) $@
|
|
||||||
|
|
||||||
|
%.stage2$(X): %.rc $(SREQ2)
|
||||||
|
@$(call E, compile_and_link: $@)
|
||||||
|
$(STAGE2) -o $@ $<
|
||||||
|
|
||||||
%.stage0.o: %.rc $(SREQ0)
|
%.stage0.o: %.rc $(SREQ0)
|
||||||
@$(call E, compile [stage0]: $@)
|
@$(call E, compile [stage0]: $@)
|
||||||
|
@ -227,15 +225,6 @@ compile-check: tidy \
|
||||||
@$(call E, compile [stage1]: $@)
|
@$(call E, compile [stage1]: $@)
|
||||||
$(STAGE1) -c -o $@ $<
|
$(STAGE1) -c -o $@ $<
|
||||||
|
|
||||||
|
|
||||||
%.stage2.o: %.rc $(SREQ2)
|
|
||||||
@$(call E, compile [stage2]: $@)
|
|
||||||
$(STAGE2) -c -o $@ $<
|
|
||||||
|
|
||||||
%.stage2.o: %.rs $(SREQ2)
|
|
||||||
@$(call E, compile [stage2]: $@)
|
|
||||||
$(STAGE2) -c -o $@ $<
|
|
||||||
|
|
||||||
# Cancel the implicit .out rule in GNU make.
|
# Cancel the implicit .out rule in GNU make.
|
||||||
%.out: %
|
%.out: %
|
||||||
|
|
||||||
|
|
|
@ -449,7 +449,6 @@ fn main(vec[str] args) {
|
||||||
let str stage = "-L" + binary_dir;
|
let str stage = "-L" + binary_dir;
|
||||||
let vec[str] gcc_args;
|
let vec[str] gcc_args;
|
||||||
let str prog = "gcc";
|
let str prog = "gcc";
|
||||||
let str exe_suffix = "";
|
|
||||||
|
|
||||||
// The invocations of gcc share some flags across platforms
|
// The invocations of gcc share some flags across platforms
|
||||||
let vec[str] common_cflags = ["-fno-strict-aliasing", "-fPIC",
|
let vec[str] common_cflags = ["-fno-strict-aliasing", "-fPIC",
|
||||||
|
@ -459,25 +458,24 @@ fn main(vec[str] args) {
|
||||||
|
|
||||||
alt (sess.get_targ_cfg().os) {
|
alt (sess.get_targ_cfg().os) {
|
||||||
case (session::os_win32) {
|
case (session::os_win32) {
|
||||||
exe_suffix = ".exe";
|
|
||||||
gcc_args = common_cflags + [
|
gcc_args = common_cflags + [
|
||||||
"-march=i686", "-O2",
|
"-march=i686", "-O2",
|
||||||
glu, main, "-o",
|
glu, main, "-o",
|
||||||
saved_out_filename + exe_suffix,
|
saved_out_filename,
|
||||||
saved_out_filename + ".o"] + common_libs;
|
saved_out_filename + ".o"] + common_libs;
|
||||||
}
|
}
|
||||||
case (session::os_macos) {
|
case (session::os_macos) {
|
||||||
gcc_args = common_cflags + [
|
gcc_args = common_cflags + [
|
||||||
"-arch i386", "-O0", "-m32",
|
"-arch i386", "-O0", "-m32",
|
||||||
glu, main, "-o",
|
glu, main, "-o",
|
||||||
saved_out_filename + exe_suffix,
|
saved_out_filename,
|
||||||
saved_out_filename + ".o"] + common_libs;
|
saved_out_filename + ".o"] + common_libs;
|
||||||
}
|
}
|
||||||
case (session::os_linux) {
|
case (session::os_linux) {
|
||||||
gcc_args = common_cflags + [
|
gcc_args = common_cflags + [
|
||||||
"-march=i686", "-O2", "-m32",
|
"-march=i686", "-O2", "-m32",
|
||||||
glu, main, "-o",
|
glu, main, "-o",
|
||||||
saved_out_filename + exe_suffix,
|
saved_out_filename,
|
||||||
saved_out_filename + ".o"] + common_libs;
|
saved_out_filename + ".o"] + common_libs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue