зеркало из https://github.com/github/ruby.git
Disable debug flag for executable files when LTO [ci skip]
Get rid of tons of linker warnings that it could not find object file symbol for every symbols, when targeting darwin.
This commit is contained in:
Родитель
97efd48fb1
Коммит
2e49e4330d
|
@ -106,12 +106,16 @@ yes-test-bundler-parallel: PARALLELRSPECOPTS += $(if $(nproc),-n$(shell expr $(n
|
||||||
# Cross reference needs to parse all files at once
|
# Cross reference needs to parse all files at once
|
||||||
love install reinstall: RDOCFLAGS = --force-update
|
love install reinstall: RDOCFLAGS = --force-update
|
||||||
|
|
||||||
|
ifneq ($(if $(filter -flto%,$(CFLAGS)),$(subst darwin,,$(arch)),$(arch)),$(arch))
|
||||||
|
override EXE_LDFLAGS = $(filter-out -g%,$(LDFLAGS))
|
||||||
|
endif
|
||||||
|
|
||||||
$(srcdir)/missing/des_tables.c: $(srcdir)/missing/crypt.c
|
$(srcdir)/missing/des_tables.c: $(srcdir)/missing/crypt.c
|
||||||
ifeq ($(if $(filter yes,$(CROSS_COMPILING)),,$(CC)),)
|
ifeq ($(if $(filter yes,$(CROSS_COMPILING)),,$(CC)),)
|
||||||
touch $@
|
touch $@
|
||||||
else
|
else
|
||||||
@$(ECHO) building make_des_table
|
@$(ECHO) building make_des_table
|
||||||
$(CC) $(INCFLAGS) $(CPPFLAGS) -DDUMP $(LDFLAGS) $(XLDFLAGS) $(LIBS) -omake_des_table $(srcdir)/missing/crypt.c
|
$(CC) $(INCFLAGS) $(CPPFLAGS) -DDUMP $(EXE_LDFLAGS) $(XLDFLAGS) $(LIBS) -omake_des_table $(srcdir)/missing/crypt.c
|
||||||
@[ -x ./make_des_table ]
|
@[ -x ./make_des_table ]
|
||||||
@$(ECHO) generating $@
|
@$(ECHO) generating $@
|
||||||
$(Q) $(MAKEDIRS) $(@D)
|
$(Q) $(MAKEDIRS) $(@D)
|
||||||
|
@ -140,7 +144,7 @@ $(STUBPROGRAM): rubystub.$(OBJEXT) $(LIBRUBY) $(MAINOBJ) $(OBJS) $(EXTOBJS) $(SE
|
||||||
rubystub$(EXEEXT):
|
rubystub$(EXEEXT):
|
||||||
@rm -f $@
|
@rm -f $@
|
||||||
$(ECHO) linking $@
|
$(ECHO) linking $@
|
||||||
$(Q) $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) rubystub.$(OBJEXT) $(EXTOBJS) $(LIBRUBYARG) $(MAINLIBS) $(LIBS) $(EXTLIBS) $(OUTFLAG)$@
|
$(Q) $(PURIFY) $(CC) $(EXE_LDFLAGS) $(XLDFLAGS) rubystub.$(OBJEXT) $(EXTOBJS) $(LIBRUBYARG) $(MAINLIBS) $(LIBS) $(EXTLIBS) $(OUTFLAG)$@
|
||||||
$(Q) $(POSTLINK)
|
$(Q) $(POSTLINK)
|
||||||
$(if $(STRIP),$(Q) $(STRIP) $@)
|
$(if $(STRIP),$(Q) $(STRIP) $@)
|
||||||
|
|
||||||
|
|
|
@ -107,6 +107,7 @@ MJIT_MIN_HEADER = $(MJIT_HEADER_BUILD_DIR)/$(MJIT_MIN_HEADER_NAME)
|
||||||
MJIT_HEADER_BUILD_DIR = $(EXTOUT)/include/$(arch)
|
MJIT_HEADER_BUILD_DIR = $(EXTOUT)/include/$(arch)
|
||||||
MJIT_TABS=@MJIT_TABS@
|
MJIT_TABS=@MJIT_TABS@
|
||||||
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
|
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
|
||||||
|
EXE_LDFLAGS = $(LDFLAGS)
|
||||||
EXTLDFLAGS = @EXTLDFLAGS@
|
EXTLDFLAGS = @EXTLDFLAGS@
|
||||||
XLDFLAGS = @XLDFLAGS@ $(EXTLDFLAGS)
|
XLDFLAGS = @XLDFLAGS@ $(EXTLDFLAGS)
|
||||||
EXTLIBS =
|
EXTLIBS =
|
||||||
|
@ -274,13 +275,13 @@ all:
|
||||||
miniruby$(EXEEXT):
|
miniruby$(EXEEXT):
|
||||||
@-if test -f $@; then $(MV) -f $@ $@.old; $(RM) $@.old; fi
|
@-if test -f $@; then $(MV) -f $@ $@.old; $(RM) $@.old; fi
|
||||||
$(ECHO) linking $@
|
$(ECHO) linking $@
|
||||||
$(Q) $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(MAINLIBS) $(LIBS) $(OUTFLAG)$@
|
$(Q) $(PURIFY) $(CC) $(EXE_LDFLAGS) $(XLDFLAGS) $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(MAINLIBS) $(LIBS) $(OUTFLAG)$@
|
||||||
$(Q) $(POSTLINK)
|
$(Q) $(POSTLINK)
|
||||||
|
|
||||||
$(PROGRAM):
|
$(PROGRAM):
|
||||||
@$(RM) $@
|
@$(RM) $@
|
||||||
$(ECHO) linking $@
|
$(ECHO) linking $@
|
||||||
$(Q) $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(MAINLIBS) $(LIBS) $(EXTLIBS) $(OUTFLAG)$@
|
$(Q) $(PURIFY) $(CC) $(EXE_LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $(EXTOBJS) $(LIBRUBYARG) $(MAINLIBS) $(LIBS) $(EXTLIBS) $(OUTFLAG)$@
|
||||||
$(Q) $(POSTLINK)
|
$(Q) $(POSTLINK)
|
||||||
|
|
||||||
PRE_LIBRUBY_UPDATE = [ -n "$(LIBRUBY_SO_UPDATE)" ] || $(gnumake:yes=exec) $(RM) $(LIBRUBY_EXTS)
|
PRE_LIBRUBY_UPDATE = [ -n "$(LIBRUBY_SO_UPDATE)" ] || $(gnumake:yes=exec) $(RM) $(LIBRUBY_EXTS)
|
||||||
|
@ -297,7 +298,7 @@ $(LIBRUBY_A):
|
||||||
|
|
||||||
verify-static-library: $(LIBRUBY_A)
|
verify-static-library: $(LIBRUBY_A)
|
||||||
$(ECHO) verifying static-library $@
|
$(ECHO) verifying static-library $@
|
||||||
@$(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $(LIBRUBY_A) $(MAINLIBS) $(EXTLIBS) $(LIBS) $(OUTFLAG)conftest$(EXEEXT)
|
@$(PURIFY) $(CC) $(EXE_LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $(LIBRUBY_A) $(MAINLIBS) $(EXTLIBS) $(LIBS) $(OUTFLAG)conftest$(EXEEXT)
|
||||||
@$(RMALL) conftest$(EXEEXT) conftest.c conftest.dSYM
|
@$(RMALL) conftest$(EXEEXT) conftest.c conftest.dSYM
|
||||||
|
|
||||||
$(LIBRUBY_SO):
|
$(LIBRUBY_SO):
|
||||||
|
|
Загрузка…
Ссылка в новой задаче