Skip to content
Snippets Groups Projects
Commit 87e34888 authored by Cheng Shao's avatar Cheng Shao Committed by Marge Bot
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.
parent 6534da24
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,8 @@ initNCGConfig dflags this_mod = NCGConfig
, ncgAsmContext = initSDocContext dflags PprCode
, ncgProcAlignment = cmmProcAlignment 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
, ncgInlineThresholdMemset = fromIntegral $ maxInlineMemsetInsns 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