Skip to content

Commit ef09c96

Browse files
authored
Fix for Setup.ghcjs.hs when no symbols are exported (input-output-hk#2060)
With more recent nixpkgs these cause: ``` emcc: error: undefined exported symbol: "" [-Wundefined] [-Werror] ```
1 parent 445086f commit ef09c96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builder/Setup.ghcjs.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ linkCLib libname desc lbi = do
122122
-- getTempRet0/setTempRet0 are for 64bit legalization.
123123
, "-s", "EXPORTED_RUNTIME_METHODS=['printErr','addFunction','removeFunction','getTempRet0','setTempRet0']"
124124
--
125-
, "-s", "EXPORTED_FUNCTIONS=['" <> intercalate "', '" exfns <> "']"
125+
, "-s", "EXPORTED_FUNCTIONS=[" <> intercalate ", " (map (\f -> "'" <> f <> "'") exfns) <> "]"
126126
] ++ libs ++ libDirs ++ extraLibs
127127

128128
postBuildHook :: Args -> BuildFlags -> PackageDescription -> LocalBuildInfo -> IO ()

0 commit comments

Comments
 (0)