Commit d33dc999 authored by Simon Marlow's avatar Simon Marlow
Browse files

add a DLL building test (#2745)

parent d25ec980
......@@ -463,3 +463,7 @@ mode001:
$(TEST_HC) --interactive --version | sed "s/, version.*//"
$(TEST_HC) --version --interactive | sed "s/, version.*//"
# Test for building DLLs with ghc -shared, see #2745
$(RM) Shared001.hi Shared001.o HSdll.dll.a HSdll.dll Shared001_stub.*
$(TEST_HC) -shared Shared001.hs
{-# LANGUAGE ForeignFunctionInterface #-}
module Shared001 where
-- Test for building DLLs with ghc -shared, see #2745
f :: Int -> Int
f x = x+1
foreign export ccall f :: Int -> Int
......@@ -204,3 +204,12 @@ test('2499', normal, compile_fail, [''])
test('mode001', normal, run_command,
['$MAKE -s --no-print-directory mode001'])
if config.platform == 'i386-unknown-mingw32':
only_windows = normal
only_windows = skip
test('shared001', [ only_windows,
extra_clean(['Shared001.hi', 'Shared001.o', 'HSdll.dll.a', 'HSdll.dll', 'Shared001_stub.c', 'Shared001_stub.h', 'Shared001_stub.o'])
], run_command,
['$MAKE -s --no-print-directory shared001'])
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment