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

common.mk: add comments about r62355 [ci skip]

transform_mjit_header.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
k0kubun 2018-02-11 05:29:13 +00:00
parent 8f66876988
commit 29777e308c
2 changed files with 3 additions and 0 deletions

View file

@ -211,6 +211,8 @@ mjit-headers: $(TIMESTAMPDIR)/$(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).time $(MJI
mjit.$(OBJEXT): mjit_config.h
mjit_config.h: Makefile
# Other `-Dxxx`s preceding `-DMJIT_HEADER` will be removed in transform_mjit_header.rb.
# So `-DMJIT_HEADER` should be passed first when rb_mjit_header.h is generated.
$(TIMESTAMPDIR)/$(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).time: probes.h vm.$(OBJEXT)
$(ECHO) building $(@F:.time=.h)
$(Q) $(CPP) -DMJIT_HEADER $(MJIT_HEADER_FLAGS) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(srcdir)/vm.c $(CPPOUTFLAG)$(@F:.time=.h).new

View file

@ -109,6 +109,7 @@ module MJITHeader
end
# -dD outputs those macros, and it produces redefinition warnings or errors
# This assumes common.mk passes `-DMJIT_HEADER` first when it creates rb_mjit_header.h.
def self.remove_predefined_macros!(code)
code.sub!(/\A(#define [^\n]+|\n)*(#define MJIT_HEADER 1\n)/, '\2')
end