[PATCH] D48888: Dropped non-supoorted "--no-as-needed" flag from OMPT tests for macOS

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 5 02:19:08 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL336327: Dropped non-supoorted "--no-as-needed" flag from OMPT tests for macOS (authored by jprotze, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D48888?vs=153965&id=154190#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D48888

Files:
  openmp/trunk/runtime/test/lit.cfg
  openmp/trunk/runtime/test/ompt/loadtool/tool_available/tool_available.c
  openmp/trunk/runtime/test/ompt/loadtool/tool_not_available/tool_not_available.c


Index: openmp/trunk/runtime/test/ompt/loadtool/tool_not_available/tool_not_available.c
===================================================================
--- openmp/trunk/runtime/test/ompt/loadtool/tool_not_available/tool_not_available.c
+++ openmp/trunk/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 %no-as-needed-flag %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 %no-as-needed-flag %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: openmp/trunk/runtime/test/ompt/loadtool/tool_available/tool_available.c
===================================================================
--- openmp/trunk/runtime/test/ompt/loadtool/tool_available/tool_available.c
+++ openmp/trunk/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 %no-as-needed-flag %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 %no-as-needed-flag %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: openmp/trunk/runtime/test/lit.cfg
===================================================================
--- openmp/trunk/runtime/test/lit.cfg
+++ openmp/trunk/runtime/test/lit.cfg
@@ -120,7 +120,11 @@
     if config.operating_system == 'Windows':
         # No such environment variable on Windows.
         config.substitutions.append(("%preload-tool", "true ||"))
+        config.substitutions.append(("%no-as-needed-flag", "-Wl,--no-as-needed"))
     elif config.operating_system == 'Darwin':
         config.substitutions.append(("%preload-tool", "env DYLD_INSERT_LIBRARIES=%T/tool.so"))
+        # No such linker flag on Darwin.
+        config.substitutions.append(("%no-as-needed-flag", ""))
     else:
         config.substitutions.append(("%preload-tool", "env LD_PRELOAD=%T/tool.so"))
+        config.substitutions.append(("%no-as-needed-flag", "-Wl,--no-as-needed"))


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48888.154190.patch
Type: text/x-patch
Size: 3167 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180705/5af51305/attachment.bin>


More information about the llvm-commits mailing list