From a3258398caae5f24a43e3eb73c4051ad8eb417ac Mon Sep 17 00:00:00 2001 From: Luke Iwanski Date: Thu, 15 Dec 2016 17:45:11 +0100 Subject: Added '-Wl,-no-as-needed' for linking *.so's, when CROSSTOOL is used. --- third_party/sycl/crosstool/computecpp.tpl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'third_party/sycl/crosstool/computecpp.tpl') diff --git a/third_party/sycl/crosstool/computecpp.tpl b/third_party/sycl/crosstool/computecpp.tpl index e90d51bf87..3c77d903a9 100755 --- a/third_party/sycl/crosstool/computecpp.tpl +++ b/third_party/sycl/crosstool/computecpp.tpl @@ -26,6 +26,8 @@ def main(): if(output_file_index == 1): # we are linking + # Inserting this flag is required as natively bazel adds "-Wl,-no-as-needed" for linking *.so's, but the CROSSTOOL doesn't. + compiler_flags.insert(5, "-Wl,-no-as-needed") return subprocess.call([CPU_CXX_COMPILER] + compiler_flags) compiler_flags = compiler_flags + ['-D_GLIBCXX_USE_CXX11_ABI=0', '-DEIGEN_USE_SYCL=1'] -- cgit v1.2.3