1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Makefile.in: MJIT_ARCHFLAG

* Makefile.in (mjit_config.h): separate MJIT_ARCHFLAG for each
  architecture on universal binary.  cannot use precompiled-header
  with multiple -arch options.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-04-22 00:02:56 +00:00
parent fed7f81b37
commit 0b429ad269

View file

@ -46,6 +46,7 @@ sitedir = @sitedir@
archlibdir = @archlibdir@
ruby_version = @ruby_version@
RUBY_VERSION_NAME = @RUBY_VERSION_NAME@
UNIVERSAL_ARCHNAMES = @UNIVERSAL_ARCHNAMES@
TESTUI = console
TESTS =
@ -555,6 +556,7 @@ mjit_config.h:
$${1+printf} $${1+' "%s"'$$sep} $${1+"$$@"}; \
echo; \
}; \
archs="$(UNIVERSAL_ARCHNAMES)"; \
test "$(Q)" = @ || set -x; \
echo '#ifndef RUBY_MJIT_CONFIG_H'; \
echo '#define RUBY_MJIT_CONFIG_H 1'; \
@ -563,12 +565,18 @@ mjit_config.h:
quote MJIT_HEADER_INSTALL_DIR "$(MJIT_HEADER_INSTALL_DIR)"; \
sep=,; \
quote "MJIT_CC_COMMON " $(MJIT_CC); \
quote "MJIT_CFLAGS " -w $(ARCH_FLAG); \
quote "MJIT_CFLAGS $${archs:+ MJIT_ARCHFLAG}" -w; \
quote "MJIT_OPTFLAGS " $(MJIT_OPTFLAGS); \
quote "MJIT_DEBUGFLAGS " $(MJIT_DEBUGFLAGS); \
quote "MJIT_LDSHARED " $(MJIT_LDSHARED); \
quote "MJIT_DLDFLAGS " @DLDFLAGS@; \
quote "MJIT_LIBS " $(LIBRUBYARG_SHARED); \
$${archs:+echo} $${archs:+'#if 0'}; \
for arch in $$archs; do \
echo "#elif defined __$${arch%=*}__"; \
quote " MJIT_ARCHFLAG " -arch $${arch%=*}; \
done; \
$${archs:+echo} $${archs:+'#endif'}; \
echo; \
echo '#endif /* RUBY_MJIT_CONFIG_H */'; \
} > $@