Skip to content

Commit f867118

Browse files
graceyin1218neboat
authored andcommitted
link against C or C++ Cilk personality fn
1 parent 61cb2c5 commit f867118

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

clang/lib/Driver/ToolChain.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,12 @@ void ToolChain::AddTapirRuntimeLibArgs(const ArgList &Args,
10831083
if (OnlyStaticOpenCilk)
10841084
CmdArgs.push_back("-Bstatic");
10851085
CmdArgs.push_back("-lopencilk");
1086+
// Link the correct Cilk personality fn
1087+
if (getDriver().CCCIsCXX())
1088+
CmdArgs.push_back("-lopencilk-personality-cpp");
1089+
else
1090+
CmdArgs.push_back("-lopencilk-personality-c");
1091+
10861092
// Add to the executable's runpath the default directory containing OpenCilk
10871093
// runtime, when the runtime is compiled as an integrated component.
10881094
addRuntimeRunPath(*this, Args, CmdArgs);

0 commit comments

Comments
 (0)