Skip to content

Commit

Permalink
[Feature #19741] Add yarp to builds
Browse files Browse the repository at this point in the history
Add yarp to common.mk and windows builds to enable us to run yarp
correctly with CI.
  • Loading branch information
jemmaissroff authored and k0kubun committed Jun 21, 2023
1 parent 03f1a6c commit d53e1f4
Show file tree
Hide file tree
Showing 6 changed files with 1,229 additions and 2 deletions.
1,214 changes: 1,214 additions & 0 deletions common.mk

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions inits.c
Expand Up @@ -80,6 +80,7 @@ rb_call_inits(void)
CALL(ast);
CALL(gc_stress);
CALL(shape);
CALL(YARP);

// enable builtin loading
CALL(builtin);
Expand Down
1 change: 1 addition & 0 deletions template/Makefile.in
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tool/leaked-globals
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tool/update-deps
Expand Up @@ -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}"
Expand Down
11 changes: 11 additions & 0 deletions win32/Makefile.sub
Expand Up @@ -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.
Expand Down Expand Up @@ -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)$(<:\=/)
Expand Down

0 comments on commit d53e1f4

Please sign in to comment.