mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
common.mk: moved macros to mjit_config.h
* Makefile.in, common.mk, win32/Makefile.sub: moved MJIT macros to mjit_config.h from XCFLAGS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2124cb65b3
commit
fe5d65f157
4 changed files with 13 additions and 7 deletions
|
@ -69,7 +69,7 @@ optflags = @optflags@
|
|||
debugflags = @debugflags@
|
||||
warnflags = @warnflags@ @strict_warnflags@
|
||||
cppflags = @cppflags@
|
||||
XCFLAGS = @XCFLAGS@ $(MJIT_CPPFLAGS)
|
||||
XCFLAGS = @XCFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@ $(INCFLAGS)
|
||||
MJIT_HEADER_FLAGS = @MJIT_HEADER_FLAGS@
|
||||
MJIT_HEADER_SUFFIX =
|
||||
|
@ -553,6 +553,8 @@ mjit_config.h:
|
|||
echo '#ifndef RUBY_MJIT_CONFIG_H'; \
|
||||
echo '#define RUBY_MJIT_CONFIG_H 1'; \
|
||||
echo; \
|
||||
sep=; \
|
||||
quote MJIT_HEADER_INSTALL_DIR "$(MJIT_HEADER_INSTALL_DIR)"; \
|
||||
sep=,; \
|
||||
quote "MJIT_CC_COMMON " $(CC); \
|
||||
quote "MJIT_CFLAGS " -w $(ARCH_FLAG); \
|
||||
|
@ -560,6 +562,7 @@ mjit_config.h:
|
|||
quote "MJIT_DEBUGFLAGS " $(debugflags); \
|
||||
quote "MJIT_LDSHARED " @LDSHARED@; \
|
||||
quote "MJIT_DLDFLAGS " @DLDFLAGS@; \
|
||||
quote "MJIT_LIBS " $(LIBRUBYARG_SHARED); \
|
||||
echo; \
|
||||
echo '#endif /* RUBY_MJIT_CONFIG_H */'; \
|
||||
} > $@
|
||||
|
|
|
@ -61,8 +61,6 @@ HTMLOUT = $(EXTOUT)/html
|
|||
CAPIOUT = doc/capi
|
||||
MJIT_HEADER = rb_mjit_header.h
|
||||
MJIT_MIN_HEADER = $(MJIT_HEADER_BUILD_DIR)/rb_mjit_min_header-$(RUBY_PROGRAM_VERSION).h
|
||||
MJIT_CPPFLAGS = -DMJIT_HEADER_INSTALL_DIR=\""$(MJIT_HEADER_INSTALL_DIR)"\" \
|
||||
-DLIBRUBYARG_SHARED=\""$(LIBRUBYARG_SHARED)"\"
|
||||
MJIT_HEADER_BUILD_DIR = $(EXTOUT)/include/$(arch)
|
||||
|
||||
INITOBJS = dmyext.$(OBJEXT) dmyenc.$(OBJEXT)
|
||||
|
|
5
mjit.c
5
mjit.c
|
@ -647,7 +647,7 @@ compile_c_to_so(const char *c_file, const char *so_file)
|
|||
const char *libs[] = {
|
||||
#ifdef _WIN32
|
||||
# ifdef _MSC_VER
|
||||
LIBRUBYARG_SHARED,
|
||||
MJIT_LIBS
|
||||
"-link",
|
||||
libruby_installed,
|
||||
libruby_build,
|
||||
|
@ -655,8 +655,7 @@ compile_c_to_so(const char *c_file, const char *so_file)
|
|||
/* Look for ruby.dll.a in build and install directories. */
|
||||
libruby_installed,
|
||||
libruby_build,
|
||||
/* Link to ruby.dll.a, because Windows DLLs don't allow unresolved symbols. */
|
||||
LIBRUBYARG_SHARED,
|
||||
MJIT_LIBS
|
||||
"-lmsvcrt",
|
||||
"-lgcc",
|
||||
# endif
|
||||
|
|
|
@ -1010,7 +1010,6 @@ s,@top_srcdir@,$(srcdir),;t t
|
|||
s,@try_header@,try_compile,;t t
|
||||
s,@ruby_pc@,$(ruby_pc),;t t
|
||||
<<KEEP
|
||||
XCFLAGS = $(XCFLAGS) $(MJIT_CPPFLAGS)
|
||||
|
||||
miniruby: miniruby$(EXEEXT)
|
||||
|
||||
|
@ -1258,6 +1257,8 @@ mjit_config.h:
|
|||
@echo making <<$@
|
||||
#ifndef RUBY_MJIT_CONFIG_H
|
||||
#define RUBY_MJIT_CONFIG_H 1
|
||||
|
||||
#define MJIT_HEADER_INSTALL_DIR "$(MJIT_HEADER_INSTALL_DIR)"
|
||||
<<KEEP
|
||||
@
|
||||
@(set sep=#define MJIT_CC_COMMON ) & \
|
||||
|
@ -1284,5 +1285,10 @@ mjit_config.h:
|
|||
for %I in ($(DLDFLAGS)) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
|
||||
@echo /* MJIT_DLDFLAGS */>> $@
|
||||
@
|
||||
@(set sep=#define MJIT_LIBS ) & \
|
||||
for %I in ($(LIBRUBYARG_SHARED)) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
|
||||
@echo /* MJIT_LIBS */>> $@
|
||||
@
|
||||
@echo.>> $@
|
||||
@echo #endif /* RUBY_MJIT_CONFIG_H */>> $@
|
||||
@$(Q:@=: :) type $@
|
||||
|
|
Loading…
Reference in a new issue