From 7fa5223444bddf4cf646de03aa83d0b994eeeade Mon Sep 17 00:00:00 2001 From: James Zern Date: Wed, 19 Aug 2015 16:24:31 -0700 Subject: [PATCH] x86inc.asm: only set visibility for chromium builds this restores the previous version's behavior avoiding issues with builds that may split sources on directory boundaries; protected visibility may work in this case. Change-Id: If37c70d9bd81de85a8e112457b9819a5cac6129d --- third_party/x86inc/README.libvpx | 1 + third_party/x86inc/x86inc.asm | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/third_party/x86inc/README.libvpx b/third_party/x86inc/README.libvpx index 9a911711a..fe5b07611 100644 --- a/third_party/x86inc/README.libvpx +++ b/third_party/x86inc/README.libvpx @@ -19,3 +19,4 @@ Set 'private_extern' visibility for macho targets. Copy PIC 'GLOBAL' macros from x86_abi_support.asm Use .text instead of .rodata on macho to avoid broken tables in PIC mode. Use .text with no alignment for aout +Only use 'hidden' visibility with Chromium diff --git a/third_party/x86inc/x86inc.asm b/third_party/x86inc/x86inc.asm index e88c85123..77a58f295 100644 --- a/third_party/x86inc/x86inc.asm +++ b/third_party/x86inc/x86inc.asm @@ -762,7 +762,14 @@ BRANCH_INSTR jz, je, jnz, jne, jl, jle, jnl, jnle, jg, jge, jng, jnge, ja, jae, %macro cglobal_internal 2-3+ %if %1 %xdefine %%FUNCTION_PREFIX private_prefix - %xdefine %%VISIBILITY hidden + ; libvpx explicitly sets visibility in shared object builds. Avoid + ; setting visibility to hidden as it may break builds that split + ; sources on e.g., directory boundaries. + %ifdef CHROMIUM + %xdefine %%VISIBILITY hidden + %else + %xdefine %%VISIBILITY + %endif %else %xdefine %%FUNCTION_PREFIX public_prefix %xdefine %%VISIBILITY