diff --git a/.github/workflows/check_sast.yml b/.github/workflows/check_sast.yml index af35f0a5a59928..a33b242892cd21 100644 --- a/.github/workflows/check_sast.yml +++ b/.github/workflows/check_sast.yml @@ -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 @@ -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 diff --git a/.github/workflows/compilers.yml b/.github/workflows/compilers.yml index 99b8f08c29fdc5..e5c964ad39d4e5 100644 --- a/.github/workflows/compilers.yml +++ b/.github/workflows/compilers.yml @@ -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 } } diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml index 1f7e23275a0c4e..541d2a869b18f8 100644 --- a/.github/workflows/scorecards.yml +++ b/.github/workflows/scorecards.yml @@ -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 diff --git a/.github/workflows/zjit-macos.yml b/.github/workflows/zjit-macos.yml index 95eae1f727b8fc..30da0afd491c86 100644 --- a/.github/workflows/zjit-macos.yml +++ b/.github/workflows/zjit-macos.yml @@ -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' }} diff --git a/.github/workflows/zjit-ubuntu.yml b/.github/workflows/zjit-ubuntu.yml index 8b0b9c9439e2e2..24b55dde8ed8f4 100644 --- a/.github/workflows/zjit-ubuntu.yml +++ b/.github/workflows/zjit-ubuntu.yml @@ -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' }} diff --git a/common.mk b/common.mk index 7113829bc5f037..68c0e1e33587fa 100644 --- a/common.mk +++ b/common.mk @@ -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) @@ -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) \ diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 40ae9d20b81680..d48780bd1f50bb 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -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, @@ -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 diff --git a/test/mkmf/test_mkmf.rb b/test/mkmf/test_mkmf.rb index 55f9aa3b889211..092f42976c1b05 100644 --- a/test/mkmf/test_mkmf.rb +++ b/test/mkmf/test_mkmf.rb @@ -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