[PATCH] D106571: [HIP] Fix visibility of __hip_fatbin
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG9a977daaf6b1: Fix __hip_fabin visibility (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106571/new/ https://reviews.llvm.org/D106571 Files: clang/lib/Driver/ToolChains/HIP.cpp clang/test/Driver/hip-toolchain-rdc.hip Index: clang/test/Driver/hip-toolchain-rdc.hip === --- clang/test/Driver/hip-toolchain-rdc.hip +++ clang/test/Driver/hip-toolchain-rdc.hip @@ -14,6 +14,7 @@ // RUN: 2>&1 | FileCheck %s // check code object alignment in dumped llvm-mc input +// CHECK: .protected __hip_fatbin // CHECK: .p2align 12 // emit objects for host side path Index: clang/lib/Driver/ToolChains/HIP.cpp === --- clang/lib/Driver/ToolChains/HIP.cpp +++ clang/lib/Driver/ToolChains/HIP.cpp @@ -180,6 +180,7 @@ // in several main host machines. ObjStream << "# HIP Object Generator\n"; ObjStream << "# *** Automatically generated by Clang ***\n"; + ObjStream << " .protected __hip_fatbin\n"; ObjStream << " .type __hip_fatbin,@object\n"; ObjStream << " .section .hip_fatbin,\"a\",@progbits\n"; ObjStream << " .globl __hip_fatbin\n"; Index: clang/test/Driver/hip-toolchain-rdc.hip === --- clang/test/Driver/hip-toolchain-rdc.hip +++ clang/test/Driver/hip-toolchain-rdc.hip @@ -14,6 +14,7 @@ // RUN: 2>&1 | FileCheck %s // check code object alignment in dumped llvm-mc input +// CHECK: .protected __hip_fatbin // CHECK: .p2align 12 // emit objects for host side path Index: clang/lib/Driver/ToolChains/HIP.cpp === --- clang/lib/Driver/ToolChains/HIP.cpp +++ clang/lib/Driver/ToolChains/HIP.cpp @@ -180,6 +180,7 @@ // in several main host machines. ObjStream << "# HIP Object Generator\n"; ObjStream << "# *** Automatically generated by Clang ***\n"; + ObjStream << " .protected __hip_fatbin\n"; ObjStream << " .type __hip_fatbin,@object\n"; ObjStream << " .section .hip_fatbin,\"a\",@progbits\n"; ObjStream << " .globl __hip_fatbin\n"; ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D106571: [HIP] Fix visibility of __hip_fatbin
scchan accepted this revision. scchan added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106571/new/ https://reviews.llvm.org/D106571 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D106571: [HIP] Fix visibility of __hip_fatbin
yaxunl created this revision. yaxunl added reviewers: tra, ashi1, scchan. yaxunl requested review of this revision. In -fgpu-rdc case, fat binary is embedded as global variable __hip_fatbin. It needs to have protected visibility to avoid conflict between shared libraries. https://reviews.llvm.org/D106571 Files: clang/lib/Driver/ToolChains/HIP.cpp clang/test/Driver/hip-toolchain-rdc.hip Index: clang/test/Driver/hip-toolchain-rdc.hip === --- clang/test/Driver/hip-toolchain-rdc.hip +++ clang/test/Driver/hip-toolchain-rdc.hip @@ -14,6 +14,7 @@ // RUN: 2>&1 | FileCheck %s // check code object alignment in dumped llvm-mc input +// CHECK: .protected __hip_fatbin // CHECK: .p2align 12 // emit objects for host side path Index: clang/lib/Driver/ToolChains/HIP.cpp === --- clang/lib/Driver/ToolChains/HIP.cpp +++ clang/lib/Driver/ToolChains/HIP.cpp @@ -180,6 +180,7 @@ // in several main host machines. ObjStream << "# HIP Object Generator\n"; ObjStream << "# *** Automatically generated by Clang ***\n"; + ObjStream << " .protected __hip_fatbin\n"; ObjStream << " .type __hip_fatbin,@object\n"; ObjStream << " .section .hip_fatbin,\"a\",@progbits\n"; ObjStream << " .globl __hip_fatbin\n"; Index: clang/test/Driver/hip-toolchain-rdc.hip === --- clang/test/Driver/hip-toolchain-rdc.hip +++ clang/test/Driver/hip-toolchain-rdc.hip @@ -14,6 +14,7 @@ // RUN: 2>&1 | FileCheck %s // check code object alignment in dumped llvm-mc input +// CHECK: .protected __hip_fatbin // CHECK: .p2align 12 // emit objects for host side path Index: clang/lib/Driver/ToolChains/HIP.cpp === --- clang/lib/Driver/ToolChains/HIP.cpp +++ clang/lib/Driver/ToolChains/HIP.cpp @@ -180,6 +180,7 @@ // in several main host machines. ObjStream << "# HIP Object Generator\n"; ObjStream << "# *** Automatically generated by Clang ***\n"; + ObjStream << " .protected __hip_fatbin\n"; ObjStream << " .type __hip_fatbin,@object\n"; ObjStream << " .section .hip_fatbin,\"a\",@progbits\n"; ObjStream << " .globl __hip_fatbin\n"; ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits