[Openmp-commits] [PATCH] D48888: Removed "--no-as-needed" flag from OMPT tests to avoid failures on OSX

Simone via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Jul 3 11:02:43 PDT 2018


simoatze created this revision.
simoatze added reviewers: protze.joachim, Hahnfeld, jeffhammond.
Herald added subscribers: openmp-commits, dexonsmith.

The flag "--no-as-needed" is not recognized on OSX by the linker making the following tests fail:

- ompt/loadtool/tool_available/tool_available.c
- ompt/loadtool/tool_not_available/tool_not_available.c

Removing the flag makes the tests pass on both Linux and OSX.
I tested it on Ubuntu 16.04 and macOS HighSierra, with Clang/LLVM 6.0.1 and OpenMP trunk.

This solution was also discussed in the OpenMP-dev mailing list.


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D48888

Files:
  runtime/test/ompt/loadtool/tool_available/tool_available.c
  runtime/test/ompt/loadtool/tool_not_available/tool_not_available.c


Index: runtime/test/ompt/loadtool/tool_not_available/tool_not_available.c
===================================================================
--- runtime/test/ompt/loadtool/tool_not_available/tool_not_available.c
+++ runtime/test/ompt/loadtool/tool_not_available/tool_not_available.c
@@ -7,9 +7,9 @@
 // RUN: %clang %flags -DTOOL -shared -fPIC %s -o %T/tool.so
 // 2. "introducing a dynamically-linked library that includes the tool’s definition of ompt_start_tool into the application’s address space"
 // 2.1 Link with tool during compilation
-// RUN: %libomp-compile -DCODE -Wl,--no-as-needed %T/tool.so && %libomp-run | FileCheck %s
+// RUN: %libomp-compile -DCODE %T/tool.so && %libomp-run | FileCheck %s
 // 2.2 Link with tool during compilation, but AFTER the runtime
-// RUN: %libomp-compile -DCODE -lomp -Wl,--no-as-needed %T/tool.so && %libomp-run | FileCheck %s
+// RUN: %libomp-compile -DCODE -lomp %T/tool.so && %libomp-run | FileCheck %s
 // 2.3 Inject tool via the dynamic loader
 // RUN: %libomp-compile -DCODE && %preload-tool %libomp-run | FileCheck %s
 
Index: runtime/test/ompt/loadtool/tool_available/tool_available.c
===================================================================
--- runtime/test/ompt/loadtool/tool_available/tool_available.c
+++ runtime/test/ompt/loadtool/tool_available/tool_available.c
@@ -7,9 +7,9 @@
 // RUN: %clang %flags -DTOOL -shared -fPIC %s -o %T/tool.so
 // 2. "introducing a dynamically-linked library that includes the tool’s definition of ompt_start_tool into the application’s address space"
 // 2.1 Link with tool during compilation
-// RUN: %libomp-compile -DCODE -Wl,--no-as-needed %T/tool.so && %libomp-run | FileCheck %s
+// RUN: %libomp-compile -DCODE %T/tool.so && %libomp-run | FileCheck %s
 // 2.2 Link with tool during compilation, but AFTER the runtime
-// RUN: %libomp-compile -DCODE -lomp -Wl,--no-as-needed %T/tool.so && %libomp-run | FileCheck %s
+// RUN: %libomp-compile -DCODE -lomp %T/tool.so && %libomp-run | FileCheck %s
 // 2.3 Inject tool via the dynamic loader
 // RUN: %libomp-compile -DCODE && %preload-tool %libomp-run | FileCheck %s
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48888.153944.patch
Type: text/x-patch
Size: 2130 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20180703/8bc375bd/attachment.bin>


More information about the Openmp-commits mailing list