Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
-
bc4b4487
by Zubin Duggal at 2026-04-03T14:22:27-04:00
9 changed files:
- compiler/GHC/Driver/Phases.hs
- testsuite/tests/plugins/Makefile
- + testsuite/tests/plugins/T24486-plugin/Makefile
- + testsuite/tests/plugins/T24486-plugin/Setup.hs
- + testsuite/tests/plugins/T24486-plugin/T24486-plugin.cabal
- + testsuite/tests/plugins/T24486-plugin/T24486_Plugin.hs
- + testsuite/tests/plugins/T24486.hs
- + testsuite/tests/plugins/T24486_Helper.hs
- testsuite/tests/plugins/all.T
Changes:
| ... | ... | @@ -262,7 +262,7 @@ objish_suffixes :: Platform -> [String] |
| 262 | 262 | -- the GHC-compiled code will run
|
| 263 | 263 | objish_suffixes platform = case platformOS platform of
|
| 264 | 264 | OSMinGW32 -> [ "o", "O", "obj", "OBJ" ]
|
| 265 | - _ -> [ "o" ]
|
|
| 265 | + _ -> [ "o", "dyn_o"]
|
|
| 266 | 266 | |
| 267 | 267 | dynlib_suffixes :: Platform -> [String]
|
| 268 | 268 | dynlib_suffixes platform = case platformOS platform of
|
| ... | ... | @@ -238,3 +238,10 @@ test-late-plugin: |
| 238 | 238 | .PHONY: T21730
|
| 239 | 239 | T21730:
|
| 240 | 240 | "$(TEST_HC)" $(TEST_HC_OPTS) $(ghcPluginWayFlags) -v0 T21730.hs -package-db T21730-plugin/pkg.T21730-plugin/local.package.conf
|
| 241 | + |
|
| 242 | +# Test that .dyn_o files are accepted as valid object files on the command line
|
|
| 243 | +# without producing "ignoring unrecognised input" warnings (#24486)
|
|
| 244 | +.PHONY: T24486
|
|
| 245 | +T24486:
|
|
| 246 | + "$(TEST_HC)" $(TEST_HC_OPTS) -v0 -c T24486_Helper.hs -osuf dyn_o
|
|
| 247 | + "$(TEST_HC)" $(TEST_HC_OPTS) $(ghcPluginWayFlags) -v0 T24486.hs T24486_Helper.dyn_o -package-db T24486-plugin/pkg.T24486-plugin/local.package.conf -fplugin T24486_Plugin -plugin-package T24486-plugin |
| 1 | +TOP=../../..
|
|
| 2 | +include $(TOP)/mk/boilerplate.mk
|
|
| 3 | +include $(TOP)/mk/test.mk
|
|
| 4 | + |
|
| 5 | +clean.%:
|
|
| 6 | + rm -rf pkg.$*
|
|
| 7 | + |
|
| 8 | +HERE := $(abspath .)
|
|
| 9 | +$(eval $(call canonicalise,HERE))
|
|
| 10 | + |
|
| 11 | +package.%:
|
|
| 12 | + $(MAKE) -s --no-print-directory clean.$*
|
|
| 13 | + mkdir pkg.$*
|
|
| 14 | + "$(TEST_HC)" -outputdir pkg.$* --make -v0 -o pkg.$*/setup Setup.hs
|
|
| 15 | + "$(GHC_PKG)" init pkg.$*/local.package.conf
|
|
| 16 | + pkg.$*/setup configure --distdir pkg.$*/dist -v0 $(CABAL_PLUGIN_BUILD) --prefix="$(HERE)/pkg.$*/install" --with-compiler="$(TEST_HC)" --with-hc-pkg="$(GHC_PKG)" --package-db=pkg.$*/local.package.conf $(if $(findstring YES,$(HAVE_PROFILING)), --enable-library-profiling)
|
|
| 17 | + pkg.$*/setup build --distdir pkg.$*/dist -v0
|
|
| 18 | + pkg.$*/setup install --distdir pkg.$*/dist -v0 |
| 1 | +import Distribution.Simple
|
|
| 2 | +main = defaultMain |
| 1 | +Name: T24486-plugin
|
|
| 2 | +Version: 0.1
|
|
| 3 | +Synopsis: For testing
|
|
| 4 | +Cabal-Version: >= 1.2
|
|
| 5 | +Build-Type: Simple
|
|
| 6 | + |
|
| 7 | +Library
|
|
| 8 | + Build-Depends: base, ghc
|
|
| 9 | + Exposed-Modules: T24486_Plugin |
| 1 | +module T24486_Plugin (plugin) where
|
|
| 2 | + |
|
| 3 | +import GHC.Plugins
|
|
| 4 | + |
|
| 5 | +plugin :: Plugin
|
|
| 6 | +plugin = defaultPlugin |
| 1 | +module Main where
|
|
| 2 | + |
|
| 3 | +main :: IO ()
|
|
| 4 | +main = return () |
| 1 | +module T24486_Helper where
|
|
| 2 | + |
|
| 3 | +helper :: Int
|
|
| 4 | +helper = 42 |
| ... | ... | @@ -395,3 +395,10 @@ test('T21730', |
| 395 | 395 | pre_cmd('$MAKE -s --no-print-directory -C T21730-plugin package.T21730-plugin TOP={top}')
|
| 396 | 396 | ],
|
| 397 | 397 | makefile_test, [])
|
| 398 | + |
|
| 399 | +test('T24486',
|
|
| 400 | + [extra_files(['T24486-plugin/', 'T24486_Helper.hs']),
|
|
| 401 | + when(opsys('mingw32'), skip),
|
|
| 402 | + pre_cmd('$MAKE -s --no-print-directory -C T24486-plugin package.T24486-plugin TOP={top}')
|
|
| 403 | + ],
|
|
| 404 | + makefile_test, []) |