summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-07 15:14:48 (GMT)
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-07 15:14:48 (GMT)
commit8430d0d123f96dd7c1a4204306aa93e301f939d3 (patch)
treec98e79068b5cf67bb5efc7b5c803fdfd929bc614 /win32
parentdfd6787f4602394dcb7c83fbb1bb8dee0251624d (diff)
win32/Makefile.sub: escape `=` in MJIT cflags
Since `=` is considered as delimiter in `()` of `for`, having `-DRUBY_DEVEL=1` in CPPFLAGS had resulted in: #define MJIT_OPTFLAGS "-DMJIT_HEADER", \ "-DRUBY_DEVEL", \ "1", \ Even escaped `for %I in (... -DRUBY_DEVEL^=1)` does not yield an expected result. This commit is a workaround for this issue. After this commit, mjit_config.h will have: #define MJIT_OPTFLAGS "-DMJIT_HEADER", \ "-DRUBY_DEVEL" MJIT_CONFIG_ESCAPED_EQ "1", \ And C macro resolves MJIT_CONFIG_ESCAPED_EQ to "=". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r--win32/Makefile.sub12
1 files changed, 6 insertions, 6 deletions
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index a2e3e2f..c9d9384 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -316,10 +316,9 @@ MJIT_PRECOMPILED_HEADER = $(MJIT_HEADER_INSTALL_DIR)/$(MJIT_PRECOMPILED_HEADER_N
MJIT_CC = $(CC)
!endif
!ifndef MJIT_OPTFLAGS
-# Short-term TODO: Include `$(XCFLAGS) $(CPPFLAGS)` to suppress warning. Currently adding them breakes JIT.
-# Long-term TODO: Use only $(OPTFLAGS) for performance. It requires to modify flags for precompiled header too.
-# Using flags used for building precompiled header to make JIT succeed.
-MJIT_OPTFLAGS = -DMJIT_HEADER $(CFLAGS)
+# TODO: Use only $(OPTFLAGS) for performance. It requires to modify flags for precompiled header too.
+# For now, using flags used for building precompiled header to make JIT succeed.
+MJIT_OPTFLAGS = -DMJIT_HEADER $(CFLAGS) $(XCFLAGS) $(CPPFLAGS)
!endif
!ifndef MJIT_DEBUGFLAGS
# TODO: Make this work... Another header for debug build needs to be installed first.
@@ -1332,6 +1331,7 @@ mjit_config.h:
#ifndef RUBY_MJIT_CONFIG_H
#define RUBY_MJIT_CONFIG_H 1
+#define MJIT_CONFIG_ESCAPED_EQ "="
#define MJIT_BUILD_DIR "$(MAKEDIR)"
#define MJIT_PRECOMPILED_HEADER_NAME "/$(MJIT_HEADER_INSTALL_DIR)/$(MJIT_PRECOMPILED_HEADER_NAME)"
<<KEEP
@@ -1345,11 +1345,11 @@ mjit_config.h:
@echo /* MJIT_CFLAGS */>> $@
@
@(set sep=#define MJIT_OPTFLAGS ) & \
- for %I in ($(MJIT_OPTFLAGS)) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
+ for %I in ($(MJIT_OPTFLAGS:^==" MJIT_CONFIG_ESCAPED_EQ ")) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
@echo /* MJIT_OPTFLAGS */>> $@
@
@(set sep=#define MJIT_DEBUGFLAGS ) & \
- for %I in ($(MJIT_DEBUGFLAGS)) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
+ for %I in ($(MJIT_DEBUGFLAGS:^==" MJIT_CONFIG_ESCAPED_EQ ")) do @(call echo.%%sep%%"%%~I", \& set sep= ) >> $@
@echo /* MJIT_DEBUGFLAGS */>> $@
@
@(set sep=#define MJIT_LDSHARED ) & \