Skip to content

Commit

Permalink
Don't mark nonlocal symbols as hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
pchintalapudi committed Sep 30, 2023
1 parent d988f8f commit e68db17
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/aotcompile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -836,8 +836,12 @@ static SmallVector<Partition, 32> partitionModule(Module &M, unsigned threads) {
continue;
if (!canPartition(G))
continue;
G.setLinkage(GlobalValue::ExternalLinkage);
G.setVisibility(GlobalValue::HiddenVisibility);
// Currently ccallable global aliases have extern linkage, we only want to make the
// internally linked functions/global variables extern+hidden
if (G.hasLocalLinkage()) {
G.setLinkage(GlobalValue::ExternalLinkage);
G.setVisibility(GlobalValue::HiddenVisibility);
}
if (auto F = dyn_cast<Function>(&G)) {
partitioner.make(&G, getFunctionWeight(*F).weight);
} else {
Expand Down

0 comments on commit e68db17

Please sign in to comment.