Skip to content
Snippets Groups Projects
Commit 3afed8f1 authored by Cheng Shao's avatar Cheng Shao
Browse files

compiler: explicitly disable PIC in wasm32 NCG

This commit explicitly disables the ncgPIC flag for the wasm32 target.
The wasm backend doesn't support PIC for the time being.

(cherry picked from commit 87e34888)
parent f83724f8
No related branches found
No related tags found
No related merge requests found
...@@ -21,7 +21,8 @@ initNCGConfig dflags this_mod = NCGConfig ...@@ -21,7 +21,8 @@ initNCGConfig dflags this_mod = NCGConfig
, ncgAsmContext = initSDocContext dflags PprCode , ncgAsmContext = initSDocContext dflags PprCode
, ncgProcAlignment = cmmProcAlignment dflags , ncgProcAlignment = cmmProcAlignment dflags
, ncgExternalDynamicRefs = gopt Opt_ExternalDynamicRefs dflags , ncgExternalDynamicRefs = gopt Opt_ExternalDynamicRefs dflags
, ncgPIC = positionIndependent dflags -- no PIC on wasm32 for now
, ncgPIC = positionIndependent dflags && not (platformArch (targetPlatform dflags) == ArchWasm32)
, ncgInlineThresholdMemcpy = fromIntegral $ maxInlineMemcpyInsns dflags , ncgInlineThresholdMemcpy = fromIntegral $ maxInlineMemcpyInsns dflags
, ncgInlineThresholdMemset = fromIntegral $ maxInlineMemsetInsns dflags , ncgInlineThresholdMemset = fromIntegral $ maxInlineMemsetInsns dflags
, ncgSplitSections = gopt Opt_SplitSections dflags , ncgSplitSections = gopt Opt_SplitSections dflags
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment