Author: dberris Date: Mon Sep 25 17:41:08 2017 New Revision: 314178 URL: http://llvm.org/viewvc/llvm-project?rev=314178&view=rev Log: Revert "[XRay][Driver] Do not link in XRay runtime in shared libs"
Reverts r314177. Removed: cfe/trunk/test/Driver/XRay/xray-shared-noxray.cpp Modified: cfe/trunk/lib/Driver/ToolChains/Gnu.cpp Modified: cfe/trunk/lib/Driver/ToolChains/Gnu.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Gnu.cpp?rev=314178&r1=314177&r2=314178&view=diff ============================================================================== --- cfe/trunk/lib/Driver/ToolChains/Gnu.cpp (original) +++ cfe/trunk/lib/Driver/ToolChains/Gnu.cpp Mon Sep 25 17:41:08 2017 @@ -206,10 +206,6 @@ void tools::gcc::Linker::RenderExtraTool static bool addXRayRuntime(const ToolChain &TC, const ArgList &Args, ArgStringList &CmdArgs) { - // Do not add the XRay runtime to shared libraries. - if (Args.hasArg(options::OPT_shared)) - return false; - if (Args.hasFlag(options::OPT_fxray_instrument, options::OPT_fnoxray_instrument, false)) { CmdArgs.push_back("-whole-archive"); @@ -217,7 +213,6 @@ static bool addXRayRuntime(const ToolCha CmdArgs.push_back("-no-whole-archive"); return true; } - return false; } Removed: cfe/trunk/test/Driver/XRay/xray-shared-noxray.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/XRay/xray-shared-noxray.cpp?rev=314177&view=auto ============================================================================== --- cfe/trunk/test/Driver/XRay/xray-shared-noxray.cpp (original) +++ cfe/trunk/test/Driver/XRay/xray-shared-noxray.cpp (removed) @@ -1,14 +0,0 @@ -// RUN: %clangxx -shared -fPIC -o /dev/null -v -fxray-instrument %s 2>&1 | \ -// RUN: FileCheck %s --check-prefix=SHARED -// RUN: %clangxx -static -o /dev/null -v -fxray-instrument %s 2>&1 -DMAIN | \ -// RUN: FileCheck %s --check-prefix=STATIC -// RUN: %clangxx -static -fPIE -o /dev/null -v -fxray-instrument %s 2>&1 \ -// RUN: -DMAIN | FileCheck %s --check-prefix=STATIC -// -// SHARED-NOT: {{clang_rt\.xray-}} -// STATIC: {{clang_rt\.xray-}} -int foo() { return 42; } - -#ifdef MAIN -int main() { return foo(); } -#endif _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits