File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1082,13 +1082,18 @@ void ToolChain::AddTapirRuntimeLibArgs(const ArgList &Args,
10821082 !Args.hasArg (options::OPT_static);
10831083 if (OnlyStaticOpenCilk)
10841084 CmdArgs.push_back (" -Bstatic" );
1085- CmdArgs. push_back ( " -lopencilk " );
1085+
10861086 // Link the correct Cilk personality fn
10871087 if (getDriver ().CCCIsCXX ())
10881088 CmdArgs.push_back (" -lopencilk-personality-cpp" );
10891089 else
10901090 CmdArgs.push_back (" -lopencilk-personality-c" );
10911091
1092+ // Link the opencilk runtime. We do this after linking the personality
1093+ // function, to ensure that symbols are resolved correctly when using static
1094+ // linking.
1095+ CmdArgs.push_back (" -lopencilk" );
1096+
10921097 // Add to the executable's runpath the default directory containing OpenCilk
10931098 // runtime, when the runtime is compiled as an integrated component.
10941099 addRuntimeRunPath (*this , Args, CmdArgs);
You can’t perform that action at this time.
0 commit comments