[Feature #19741] Add yarp to builds

Add yarp to common.mk and windows builds to enable us to run yarp
correctly with CI.
This commit is contained in:
Jemma Issroff 2023-06-20 11:48:12 -04:00 committed by Takashi Kokubun
parent 03f1a6c4c5
commit d53e1f42ff
Notes: git 2023-06-21 18:26:03 +00:00
6 changed files with 1229 additions and 2 deletions

1214
common.mk

File diff suppressed because it is too large Load Diff

View File

@ -80,6 +80,7 @@ rb_call_inits(void)
CALL(ast);
CALL(gc_stress);
CALL(shape);
CALL(YARP);
// enable builtin loading
CALL(builtin);

View File

@ -107,6 +107,7 @@ YJIT_LIBS=@YJIT_LIBS@
YJIT_OBJ=@YJIT_OBJ@
YJIT_LIBOBJ = $(YJIT_LIBS:.a=.@OBJEXT@)
CARGO_TARGET_DIR=@abs_top_builddir@/yjit/target
YARP_BUILD_DIR=@abs_top_builddir@/yarp
CARGO_BUILD_ARGS=@CARGO_BUILD_ARGS@
LDFLAGS = @STATIC@ $(CFLAGS) @LDFLAGS@
EXE_LDFLAGS = $(LDFLAGS)

View File

@ -55,7 +55,7 @@ IO.foreach("|#{NM} #{ARGV.join(' ')}") do |line|
next unless /[A-TV-Z]/ =~ t
next unless n.sub!(/^#{SYMBOL_PREFIX}/o, "")
next if n.include?(".")
next if /\A(?:Init_|InitVM_|RUBY_|ruby_|rb_|[Oo]nig|dln_|coroutine_)/ =~ n
next if /\A(?:Init_|InitVM_|RUBY_|ruby_|rb_|yp_|[Oo]nig|dln_|coroutine_)/ =~ n
next if REPLACE.include?(n)
puts col.fail("leaked") if count.zero?
count += 1

View File

@ -173,7 +173,7 @@ def in_makefile(target, source)
target = target.to_s
source = source.to_s
case target
when %r{\A[^/]*\z}, %r{\Acoroutine/}
when %r{\A[^/]*\z}, %r{\Acoroutine/}, %r{\Ayarp/}
target2 = "#{target.sub(/\.o\z/, '.$(OBJEXT)')}"
case source
when *FILES_IN_SOURCE_DIRECTORY then source2 = "$(top_srcdir)/#{source}"

View File

@ -514,6 +514,8 @@ VCSUP = rem
!endif
ruby_pc = $(RUBY_BASE_NAME)-$(MAJOR).$(MINOR).pc
YARP_BUILD_DIR = $(MAKEDIR)/yarp
MESSAGE_BEGIN = @(for %I in (
MESSAGE_END = ) do @echo.%~I)
ECHO_BEGIN = @echo.
@ -1278,6 +1280,15 @@ $(ruby_pc): $(RBCONFIG)
$(ECHO) assembling $(<:\=/)
$(Q) $(AS) $(ASFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(<:\=/)
{$(srcdir)/yarp}.c.obj:
$(ECHO) compiling $(<:\=/)
$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(<:\=/)
{$(srcdir)/yarp/enc}.c.obj:
$(ECHO) compiling $(<:\=/)
$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(<:\=/)
{$(srcdir)/yarp/util}.c.obj:
$(ECHO) compiling $(<:\=/)
$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(<:\=/)
{$(srcdir)/enc/trans}.c.obj:
$(ECHO) compiling $(<:\=/)
$(Q) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$(<:\=/)