mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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:
parent
97efd48fb1
commit
2e49e4330d
2 changed files with 10 additions and 5 deletions
|
@ -106,12 +106,16 @@ yes-test-bundler-parallel: PARALLELRSPECOPTS += $(if $(nproc),-n$(shell expr $(n
|
|||
# Cross reference needs to parse all files at once
|
||||
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
|
||||
ifeq ($(if $(filter yes,$(CROSS_COMPILING)),,$(CC)),)
|
||||
touch $@
|
||||
else
|
||||
@$(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 ]
|
||||
@$(ECHO) generating $@
|
||||
$(Q) $(MAKEDIRS) $(@D)
|
||||
|
@ -140,7 +144,7 @@ $(STUBPROGRAM): rubystub.$(OBJEXT) $(LIBRUBY) $(MAINOBJ) $(OBJS) $(EXTOBJS) $(SE
|
|||
rubystub$(EXEEXT):
|
||||
@rm -f $@
|
||||
$(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)
|
||||
$(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_TABS=@MJIT_TABS@
|
||||
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
|
||||
EXE_LDFLAGS = $(LDFLAGS)
|
||||
EXTLDFLAGS = @EXTLDFLAGS@
|
||||
XLDFLAGS = @XLDFLAGS@ $(EXTLDFLAGS)
|
||||
EXTLIBS =
|
||||
|
@ -274,13 +275,13 @@ all:
|
|||
miniruby$(EXEEXT):
|
||||
@-if test -f $@; then $(MV) -f $@ $@.old; $(RM) $@.old; fi
|
||||
$(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)
|
||||
|
||||
$(PROGRAM):
|
||||
@$(RM) $@
|
||||
$(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)
|
||||
|
||||
PRE_LIBRUBY_UPDATE = [ -n "$(LIBRUBY_SO_UPDATE)" ] || $(gnumake:yes=exec) $(RM) $(LIBRUBY_EXTS)
|
||||
|
@ -297,7 +298,7 @@ $(LIBRUBY_A):
|
|||
|
||||
verify-static-library: $(LIBRUBY_A)
|
||||
$(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
|
||||
|
||||
$(LIBRUBY_SO):
|
||||
|
|
Loading…
Reference in a new issue