Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/check_sast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ jobs:
persist-credentials: false

- name: Initialize CodeQL
uses: github/codeql-action/init@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6
uses: github/codeql-action/init@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7
with:
languages: ${{ matrix.language }}
build-mode: none
config-file: .github/codeql/codeql-config.yml

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6
uses: github/codeql-action/analyze@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7
with:
category: '/language:${{ matrix.language }}'
upload: False
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
continue-on-error: true

- name: Upload SARIF
uses: github/codeql-action/upload-sarif@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6
uses: github/codeql-action/upload-sarif@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7
with:
sarif_file: sarif-results/${{ matrix.language }}.sarif
continue-on-error: true
1 change: 0 additions & 1 deletion .github/workflows/compilers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ jobs:
tag: clang-22
with_gcc: 'clang-22 -flto=auto'
optflags: '-O2'
enable_shared: false
timeout-minutes: 30
- { uses: './.github/actions/compilers', name: '-O0', with: { optflags: '-O0 -march=x86-64 -mtune=generic' }, timeout-minutes: 8 }
# - { uses: './.github/actions/compilers', name: '-O3', with: { optflags: '-O3 -march=x86-64 -mtune=generic', check: true } }
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard (optional).
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@5595ccaf912efad79be6eef63a5619ff05969be3 # v4.37.6
uses: github/codeql-action/upload-sarif@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.37.7
with:
sarif_file: results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/zjit-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
rustup install ${{ matrix.rust_version }} --profile minimal
rustup default ${{ matrix.rust_version }}
- uses: taiki-e/install-action@7f4eb899022d8fe70b20c4f3de697aa85c309026 # v2.85.11
- uses: taiki-e/install-action@82cd3e7658a6f96c86c0234aeeda1748937cb0a1 # v2.85.13
with:
tool: nextest@0.9
if: ${{ matrix.test_task == 'zjit-check' }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zjit-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ jobs:
ruby-version: '3.1'
bundler: none

- uses: taiki-e/install-action@7f4eb899022d8fe70b20c4f3de697aa85c309026 # v2.85.11
- uses: taiki-e/install-action@82cd3e7658a6f96c86c0234aeeda1748937cb0a1 # v2.85.13
with:
tool: nextest@0.9
if: ${{ matrix.test_task == 'zjit-check' }}
Expand Down
6 changes: 3 additions & 3 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -1353,8 +1353,8 @@ build-tool/dump_ast$(BUILD_EXEEXT): build-tool/Makefile

clean-local:: clean-build-tool
clean-build-tool:
- cd build-tool && $(MAKE) clean 2> $(NULL) || $(NULLCMD)
- $(RMDIR) build-tool
- cd build-tool 2> $(NULL) && $(MAKE) clean 2> $(NULL) || $(NULLCMD)
- $(RMDIR) build-tool 2> $(NULL) || $(NULLCMD)

$(srcdir)/revision.h$(no_baseruby:no=~disabled~): $(REVISION_H)

Expand Down Expand Up @@ -2045,7 +2045,7 @@ clean-modular-gc: gc/clean
distclean-modular-gc: gc/distclean
realclean-modular-gc: gc/realclean
distclean-modular-gc realclean-modular-gc:
-$(Q) $(RMDIR) gc
-$(Q) $(RMDIR) gc 2> $(NULL) || $(NULLCMD)

help: PHONY
$(MESSAGE_BEGIN) \
Expand Down
3 changes: 1 addition & 2 deletions lib/mkmf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,6 @@ def try_do(src, command, **opts, &b)
end

def link_config(ldflags, opt="", libpath=$DEFLIBPATH|$LIBPATH)
librubyarg = $extmk ? $LIBRUBYARG_STATIC : "$(LIBRUBYARG)"
conf = RbConfig::CONFIG.merge('hdrdir' => $hdrdir.quote,
'src' => "#{conftest_source}",
'arch_hdrdir' => $arch_hdrdir.quote,
Expand All @@ -550,7 +549,7 @@ def link_config(ldflags, opt="", libpath=$DEFLIBPATH|$LIBPATH)
'ARCH_FLAG' => "#$ARCH_FLAG",
'LDFLAGS' => "#$LDFLAGS #{ldflags}",
'LOCAL_LIBS' => "#$LOCAL_LIBS #$libs",
'LIBS' => "#{librubyarg} #{opt} #$LIBS")
'LIBS' => "$(LIBRUBYARG) #{opt} #$LIBS")
conf['LIBPATH'] = libpathflag(libpath.map {|s| RbConfig::expand(s.dup, conf)})
conf
end
Expand Down
14 changes: 14 additions & 0 deletions test/mkmf/test_mkmf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,17 @@ class TestMkmfGlobal < Test::Unit::TestCase
end
end
end

class TestMkmfLinkConfig < Test::Unit::TestCase
def test_use_configured_libruby_for_bundled_extensions
librubyarg = RbConfig::CONFIG["LIBRUBYARG"]

RbConfig::CONFIG["LIBRUBYARG"] = "-lruby"
assert_include(Shellwords.shellsplit(link_command("")), "-lruby")

RbConfig::CONFIG["LIBRUBYARG"] = "-lruby-static"
assert_include(Shellwords.shellsplit(link_command("")), "-lruby-static")
ensure
RbConfig::CONFIG["LIBRUBYARG"] = librubyarg
end
end