File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Cabal/src/Distribution/Simple Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1586,11 +1586,14 @@ gbuild verbosity numJobs pkg_descr lbi bm clbi = do
1586
1586
dynamicTooSupported = supportsDynamicToo comp
1587
1587
cLikeObjs = map (`replaceExtension` objExtension) cSrcs
1588
1588
cxxObjs = map (`replaceExtension` objExtension) cxxSrcs
1589
- jsObjs = map (`replaceExtension` objExtension) jsSrcs
1589
+ jsObjs = if hasJsSupport then map (`replaceExtension` objExtension) jsSrcs else []
1590
1590
asmObjs = map (`replaceExtension` objExtension) asmSrcs
1591
1591
cmmObjs = map (`replaceExtension` objExtension) cmmSrcs
1592
1592
needDynamic = gbuildNeedDynamic lbi bm
1593
1593
needProfiling = withProfExe lbi
1594
+ Platform hostArch _ = hostPlatform lbi
1595
+ hasJsSupport = hostArch == JavaScript
1596
+
1594
1597
1595
1598
-- build executables
1596
1599
baseOpts =
@@ -1816,7 +1819,7 @@ gbuild verbosity numJobs pkg_descr lbi bm clbi = do
1816
1819
buildExtraSources Internal. componentCcGhcOptions True cSrcs
1817
1820
1818
1821
-- build any JS sources
1819
- unless (null $ jsSourceFiles buildSources) $ do
1822
+ unless (not hasJsSupport || null ( jsSourceFiles buildSources) ) $ do
1820
1823
info verbosity " Building JS Sources..."
1821
1824
buildExtraSources Internal. componentJsGhcOptions False jsSrcs
1822
1825
You can’t perform that action at this time.
0 commit comments