Skip to content

Commit 79ba1c6

Browse files
committed
Set various CLI commands in RbConfig
* To the same values as CRuby 2.7.3 on Linux and macOS. * Difference: use 'mkdir' and not '/usr/bin/mkdir' on Linux, since it might be somewhere else (this is the case in CI). * To avoid extra `ruby -run -e mkdir/install/...` subprocesses.
1 parent 0ae6b31 commit 79ba1c6

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

lib/cext/ABI_version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9
1+
10

lib/truffle/rbconfig.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ module RbConfig
5555

5656
arch = "#{host_cpu}-#{host_os}"
5757
libs = ''
58+
rmdir = Truffle::Platform.linux? ? 'rmdir --ignore-fail-on-non-empty' : 'rmdir'
5859

5960
prefix = ruby_home
6061
graalvm_home = TruffleRuby.graalvm_home
@@ -134,6 +135,7 @@ module RbConfig
134135
'configure_args' => ' ',
135136
'CC' => cc,
136137
'CCDLFLAGS' => '-fPIC',
138+
'CP' => 'cp',
137139
'CXX' => cxx,
138140
'COUTFLAG' => '-o ',
139141
'cppflags' => cppflags,
@@ -154,6 +156,7 @@ module RbConfig
154156
'host' => host,
155157
'host_os' => host_os_full,
156158
'includedir' => "#{prefix}/lib/cext", # the parent dir of rubyhdrdir
159+
'INSTALL' => '/usr/bin/install -c',
157160
'LDFLAGS' => ldflags,
158161
'libdirname' => 'libdir',
159162
'LIBEXT' => 'a',
@@ -167,6 +170,8 @@ module RbConfig
167170
'LIBRUBY_SO' => "cext/libtruffleruby.#{Truffle::Platform::SOEXT}",
168171
'LIBS' => libs,
169172
'libtruffleruby' => libtruffleruby,
173+
'MAKEDIRS' => 'mkdir -p',
174+
'MKDIR_P' => 'mkdir -p',
170175
'NULLCMD' => ':',
171176
'OBJEXT' => 'o',
172177
'optflags' => optflags,
@@ -175,6 +180,9 @@ module RbConfig
175180
'prefix' => prefix,
176181
'RANLIB' => ranlib,
177182
'RM' => 'rm -f',
183+
'RMALL' => 'rm -fr',
184+
'RMDIR' => rmdir,
185+
'RMDIRS' => "#{rmdir} -p",
178186
'RPATHFLAG' => ' -Wl,-rpath,%1$-s',
179187
'RUBY_BASE_NAME' => ruby_base_name,
180188
'ruby_install_name' => ruby_install_name,

0 commit comments

Comments
 (0)