HomePhabricator

Set hidden attribute on lprofMergeValueProfData

Description

Set hidden attribute on lprofMergeValueProfData

Summary:
The changes in https://reviews.llvm.org/D44847 cause load time failure
due to lprofMergeValueProfData in Android libs enabled with profile generation:

"dlopen failed: cannot locate symbol "lprofMergeValueProfData" referenced by..."

Marking lprofMergeValueProfData as hidden so the correct in-module definition
is picked by the linker.

Reviewers: davidxl

Reviewed By: davidxl

Subscribers: efriedma, xur, davidxl, llvm-commits

Differential Revision: https://reviews.llvm.org/D55893

Details

Event Timeline

It looks like this fails on Darwin:

http://green.lab.llvm.org/green/job/clang-stage1-configure-RA/53956/consoleFull

Exit Code: 1

Command Output (stdout):
--
ld: warning: cannot export hidden symbol _lprofMergeValueProfData from /Users/buildslave/jenkins/workspace/clang-stage1-configure-RA/clang-build/lib/clang/9.0.0/lib/darwin/libclang_rt.profile_osx.a(InstrProfilingMergeFile.c.o)
ld: warning: cannot export hidden symbol _lprofMergeValueProfData from /Users/buildslave/jenkins/workspace/clang-stage1-configure-RA/clang-build/lib/clang/9.0.0/lib/darwin/libclang_rt.profile_osx.a(InstrProfilingMergeFile.c.o)

--
Command Output (stderr):
--
Expected 0 lines, got 2.

--