mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
win32/Makefile.sub: generate MJIT header pdb
in the MJIT-header-specific path, not default path like vc140.pdb. mjit_worker.c: specify the MJIT-header-specific pdb path. tool/rbinstall.rb: install MJIT header pdb as well. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65003 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3dd4867340
commit
0fd5f063aa
3 changed files with 14 additions and 2 deletions
|
@ -692,7 +692,7 @@ static int
|
|||
compile_c_to_so(const char *c_file, const char *so_file)
|
||||
{
|
||||
int exit_code;
|
||||
const char *files[] = { NULL, NULL, NULL, NULL, NULL, "-link", libruby_pathflag, NULL };
|
||||
const char *files[] = { NULL, NULL, NULL, NULL, NULL, NULL, "-link", libruby_pathflag, NULL };
|
||||
char **args;
|
||||
char *p, *obj_file;
|
||||
|
||||
|
@ -728,6 +728,13 @@ compile_c_to_so(const char *c_file, const char *so_file)
|
|||
p = append_str2(p, c_file, strlen(c_file));
|
||||
*p = '\0';
|
||||
|
||||
/* files[5] = "-Fd*.pdb" */
|
||||
files[5] = p = alloca(sizeof(char) * (rb_strlen_lit("-Fd") + strlen(pch_file) + 1));
|
||||
p = append_lit(p, "-Fd");
|
||||
p = append_str2(p, pch_file, strlen(pch_file) - rb_strlen_lit(".pch"));
|
||||
p = append_lit(p, ".pdb");
|
||||
*p = '\0';
|
||||
|
||||
args = form_args(5, CC_LDSHARED_ARGS, CC_CODEFLAG_ARGS,
|
||||
files, CC_LIBS, CC_DLDFLAGS_ARGS);
|
||||
if (args == NULL)
|
||||
|
|
|
@ -406,6 +406,7 @@ install?(:ext, :arch, :hdr, :'arch-hdr', :'hdr-arch') do
|
|||
install_recursive("#{$extout}/include/#{CONFIG['arch']}", archhdrdir, :glob => "*.h", :mode => $data_mode)
|
||||
install_recursive("#{$extout}/include/#{CONFIG['arch']}", archhdrdir, :glob => "rb_mjit_header-*.obj", :mode => $data_mode)
|
||||
install_recursive("#{$extout}/include/#{CONFIG['arch']}", archhdrdir, :glob => "rb_mjit_header-*.pch", :mode => $data_mode)
|
||||
install_recursive("#{$extout}/include/#{CONFIG['arch']}", archhdrdir, :glob => "rb_mjit_header-*.pdb", :mode => $data_mode)
|
||||
end
|
||||
install?(:ext, :comm, :'ext-comm') do
|
||||
prepare "extension scripts", rubylibdir
|
||||
|
|
|
@ -1275,9 +1275,11 @@ clean-local::
|
|||
$(Q)$(RM) $(MJIT_PRECOMPILED_HEADER_NAME) $(MJIT_PRECOMPILED_HEADER_NAME:.pch=.)$(OBJEXT)
|
||||
$(Q)$(RM) $(TIMESTAMPDIR)/$(MJIT_PRECOMPILED_HEADER_NAME:.pch=.time) mjit_config.h
|
||||
$(Q)$(RM) $(MJIT_HEADER_INSTALL_DIR)/rb_mjit_header-*.pch
|
||||
$(Q)$(RM) $(MJIT_HEADER_INSTALL_DIR)/rb_mjit_header-*.pdb
|
||||
$(Q)$(RM) $(MJIT_HEADER_INSTALL_DIR)/rb_mjit_header-*.$(OBJEXT)
|
||||
-$(Q) $(RMDIRS) $(MJIT_HEADER_INSTALL_DIR) 2> $(NULL) || exit 0
|
||||
$(Q)$(RM) $(arch_hdrdir)/rb_mjit_header-*.pch
|
||||
$(Q)$(RM) $(arch_hdrdir)/rb_mjit_header-*.pdb
|
||||
$(Q)$(RM) $(arch_hdrdir)/rb_mjit_header-*.$(OBJEXT)
|
||||
|
||||
# Non-mswin environment is not using prebuilt precompiled header because upgrading compiler
|
||||
|
@ -1292,7 +1294,7 @@ clean-local::
|
|||
$(TIMESTAMPDIR)/$(MJIT_PRECOMPILED_HEADER_NAME:.pch=).time: probes.h vm.$(OBJEXT)
|
||||
$(ECHO) building $(@F:.time=.pch)
|
||||
$(Q) $(CC) -DMJIT_HEADER $(CFLAGS) $(XCFLAGS:-DRUBY_EXPORT =) -URUBY_EXPORT $(CPPFLAGS) $(srcdir)/vm.c -c -Yc \
|
||||
$(COUTFLAG)$(@F:.time=.)$(OBJEXT) -Fp$(@F:.time=.pch).new
|
||||
$(COUTFLAG)$(@F:.time=.)$(OBJEXT) -Fd$(@F:.time=.pdb) -Fp$(@F:.time=.pch).new
|
||||
$(Q) $(IFCHANGE) "--timestamp=$@" $(@F:.time=.pch) $(@F:.time=.pch).new
|
||||
|
||||
$(MJIT_PRECOMPILED_HEADER_NAME): $(TIMESTAMPDIR)/$(MJIT_PRECOMPILED_HEADER_NAME:.pch=).time
|
||||
|
@ -1301,9 +1303,11 @@ $(MJIT_PRECOMPILED_HEADER): $(MJIT_PRECOMPILED_HEADER_NAME)
|
|||
$(Q) $(MAKEDIRS) $(MJIT_HEADER_INSTALL_DIR)
|
||||
$(Q) $(MAKE_LINK) $(MJIT_PRECOMPILED_HEADER_NAME) $@
|
||||
$(Q) $(MAKE_LINK) $(MJIT_PRECOMPILED_HEADER_NAME:.pch=.)$(OBJEXT) $(MJIT_HEADER_INSTALL_DIR)/$(MJIT_PRECOMPILED_HEADER_NAME:.pch=.)$(OBJEXT)
|
||||
$(Q) $(MAKE_LINK) $(MJIT_PRECOMPILED_HEADER_NAME:.pch=.pdb) $(MJIT_HEADER_INSTALL_DIR)/$(MJIT_PRECOMPILED_HEADER_NAME:.pch=.pdb)
|
||||
$(Q) $(MAKEDIRS) $(arch_hdrdir)
|
||||
$(Q) $(MAKE_LINK) $(MJIT_PRECOMPILED_HEADER_NAME) $(arch_hdrdir)/$(MJIT_PRECOMPILED_HEADER_NAME)
|
||||
$(Q) $(MAKE_LINK) $(MJIT_PRECOMPILED_HEADER_NAME:.pch=.)$(OBJEXT) $(arch_hdrdir)/$(MJIT_PRECOMPILED_HEADER_NAME:.pch=.)$(OBJEXT)
|
||||
$(Q) $(MAKE_LINK) $(MJIT_PRECOMPILED_HEADER_NAME:.pch=.pdb) $(arch_hdrdir)/$(MJIT_PRECOMPILED_HEADER_NAME:.pch=.pdb)
|
||||
|
||||
INSNS = opt_sc.inc optinsn.inc optunifs.inc insns.inc insns_info.inc \
|
||||
vmtc.inc vm.inc mjit_compile.inc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue