[Lldb-commits] [PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-02-25 Thread Harmen Stoppels via Phabricator via lldb-commits
haampie added a comment.

Should this be merged?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95119/new/

https://reviews.llvm.org/D95119

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-02-25 Thread Harmen Stoppels via Phabricator via lldb-commits
haampie added a comment.

I don't have commit access, would be great if you could do that for me!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95119/new/

https://reviews.llvm.org/D95119

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D79219: [CMake] Simplify CMake handling for zlib

2020-08-12 Thread Harmen Stoppels via Phabricator via lldb-commits
haampie added a comment.

Great, one benefit of this is that zlib can now be detected in non-system libs. 
Maybe we should handle ncurses / TERMINFO in a similar manner? It currently has 
similar logic as finding zlib had


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79219/new/

https://reviews.llvm.org/D79219

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D85820: Use find_library for ncurses

2020-08-19 Thread Harmen Stoppels via Phabricator via lldb-commits
haampie added a comment.

@gribozavr2: can you try https://reviews.llvm.org/D86134? It should fix your 
issue, as well as the same issue w.r.t. the ZLIB changes of 
https://reviews.llvm.org/D79219 on macOS.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85820/new/

https://reviews.llvm.org/D85820

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D85820: Use find_library for ncurses

2020-08-19 Thread Harmen Stoppels via Phabricator via lldb-commits
haampie added a comment.

@srj could you please try / review https://reviews.llvm.org/D86173 for a fix 
for your problem?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85820/new/

https://reviews.llvm.org/D85820

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D79219: [CMake] Simplify CMake handling for zlib

2020-08-19 Thread Harmen Stoppels via Phabricator via lldb-commits
haampie added inline comments.



Comment at: llvm/lib/Support/CMakeLists.txt:217
+  endif()
+  if(CMAKE_SHARED_LIBRARY_PREFIX AND CMAKE_SHARED_LIBRARY_SUFFIX AND
+  zlib_library MATCHES 
"^${CMAKE_SHARED_LIBRARY_PREFIX}.*${CMAKE_SHARED_LIBRARY_SUFFIX}$")

This will not work on macOS since cmake will find stub libraries by default 
(/path/to/libz.tbd), see 
https://github.com/Kitware/CMake/blob/master/Modules/Platform/Darwin.cmake#L71 
for the search order.

Instead you most likely want to use `CMAKE_FIND_LIBRARY_PREFIXES` and 
`CMAKE_FIND_LIBRARY_SUFFIXES`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79219/new/

https://reviews.llvm.org/D79219

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D85820: Use find_library for ncurses

2020-08-19 Thread Harmen Stoppels via Phabricator via lldb-commits
haampie added inline comments.



Comment at: llvm/include/llvm/Config/config.h.cmake:212
 /* Define if the setupterm() function is supported this platform. */
-#cmakedefine HAVE_TERMINFO ${HAVE_TERMINFO}
+#cmakedefine LLVM_ENABLE_TERMINFO ${LLVM_ENABLE_TERMINFO}
 

srj wrote:
> srj wrote:
> > In my local build of LLVM, I end up with 
> > 
> > `#define LLVM_ENABLE_TERMINFO 1`
> > 
> > in the generated `config.h` file, even thought I configured LLVM's CMake 
> > build with `-D LLVM_ENABLE_TERMINFO=OFF` -- surely this is a bug.
> > 
> (fyi, prior to this commit, the corresponding line was `/* #undef 
> HAVE_TERMINFO */`)
@srj you are completely right, the `find_library` lost its `if 
(LLVM_ENABLE_TERMINFO)` when the last review comments were addressed. Let me 
submit a patch asap


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85820/new/

https://reviews.llvm.org/D85820

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D85820: Use find_library for ncurses

2020-08-25 Thread Harmen Stoppels via Phabricator via lldb-commits
haampie added a comment.

@gkistanova It's true that this change has lead to more issues I could ever 
imagine, but I think the link you provided is the last remaining problem.

Pinging @phosek for a similar issue w.r.t. zlib: since 
https://reviews.llvm.org/D79219 zlib gets disabled on static builds of LLVM.  
The reason is `find_package(ZLIB)` finds a shared library, and 
`check_symbol_exists(compress2 zlib.h HAVE_ZLIB)` tries to statically link to 
that -- it can't so zlib is disabled. I guess that's a regression too?

What would be the best way forward @phosek? A quick fix for ncurses is to add a 
simple `check_symbol_exists` test too, but that would in practice just disable 
ncurses in static builds. And additionally we could find static libs by adding 
explicit names like `libtinfo.a` to find_library when `LLVM_BUILD_STATIC=ON`. 
This trick won't help for zlib though, the find_library stuff is hidden inside 
find_package, and there is no way to target static libs it seems.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85820/new/

https://reviews.llvm.org/D85820

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D86521: Revert "Use find_library for ncurses"

2020-08-25 Thread Harmen Stoppels via Phabricator via lldb-commits
haampie created this revision.
haampie added reviewers: JDevlieghere, phosek, gkistanova.
Herald added subscribers: llvm-commits, lldb-commits, Sanitizers, hiraditya, 
mgorny.
Herald added projects: Sanitizers, LLDB, LLVM.
haampie requested review of this revision.

The introduction of find_library for ncurses caused more issues than it solved 
problems. The current open issue is it makes the static build of LLVM fail. 
It's better to revert for now, and get back to it later.

Revert "[CMake] Fix an issue where get_system_libname creates an empty regex 
capture on windows"

This reverts commit 1ed1e16ab83f55d85c90ae43a05cbe08a00c20e0 
.

Revert "Fix msan build"

This reverts commit 34fe9613dda3c7d8665b609136a8c12deb122382 
.

Revert "[CMake] Always mark terminfo as unavailable on Windows"

This reverts commit 76bf26236f6fd453343666c3cd91de8f74ffd89d 
.

Revert "[CMake] Fix OCaml build failure because of absolute path in system libs"

This reverts commit 8e4acb82f71ad4effec8895b8fc957189ce95933 
.

Revert "[CMake] Don't look for terminfo libs when LLVM_ENABLE_TERMINFO=OFF"

This reverts commit 495f91fd33d492941c39424a32cf24bcfe192f35 
.

Revert "Use find_library for ncurses"

This reverts commit a52173a3e56553d7b795bcf3cdadcf6433117107 
.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D86521

Files:
  compiler-rt/cmake/config-ix.cmake
  compiler-rt/lib/xray/tests/CMakeLists.txt
  lldb/source/Core/CMakeLists.txt
  llvm/cmake/config-ix.cmake
  llvm/include/llvm/Config/config.h.cmake
  llvm/lib/Support/CMakeLists.txt
  llvm/lib/Support/Unix/Process.inc
  llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn

Index: llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
===
--- llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
+++ llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
@@ -284,9 +284,9 @@
   }
 
   if (llvm_enable_terminfo) {
-values += [ "LLVM_ENABLE_TERMINFO=1" ]
+values += [ "HAVE_TERMINFO=1" ]
   } else {
-values += [ "LLVM_ENABLE_TERMINFO=" ]
+values += [ "HAVE_TERMINFO=" ]
   }
 
   if (llvm_enable_dia_sdk) {
Index: llvm/lib/Support/Unix/Process.inc
===
--- llvm/lib/Support/Unix/Process.inc
+++ llvm/lib/Support/Unix/Process.inc
@@ -313,7 +313,7 @@
   return getColumns();
 }
 
-#ifdef LLVM_ENABLE_TERMINFO
+#ifdef HAVE_TERMINFO
 // We manually declare these extern functions because finding the correct
 // headers from various terminfo, curses, or other sources is harder than
 // writing their specs down.
@@ -323,12 +323,12 @@
 extern "C" int tigetnum(char *capname);
 #endif
 
-#ifdef LLVM_ENABLE_TERMINFO
+#ifdef HAVE_TERMINFO
 static ManagedStatic TermColorMutex;
 #endif
 
 static bool terminalHasColors(int fd) {
-#ifdef LLVM_ENABLE_TERMINFO
+#ifdef HAVE_TERMINFO
   // First, acquire a global lock because these C routines are thread hostile.
   std::lock_guard G(*TermColorMutex);
 
Index: llvm/lib/Support/CMakeLists.txt
===
--- llvm/lib/Support/CMakeLists.txt
+++ llvm/lib/Support/CMakeLists.txt
@@ -2,19 +2,6 @@
   set(imported_libs ZLIB::ZLIB)
 endif()
 
-function(get_system_libname libpath libname)
-  get_filename_component(libpath ${libpath} NAME)
-  if( CMAKE_FIND_LIBRARY_PREFIXES )
-string(REPLACE ";" "|" PREFIXES "${CMAKE_FIND_LIBRARY_PREFIXES}")
-string(REGEX REPLACE "^(${PREFIXES})" "" libpath ${libpath})
-  endif()
-  if( CMAKE_FIND_LIBRARY_SUFFIXES )
-string(REPLACE ";" "|" SUFFIXES "${CMAKE_FIND_LIBRARY_SUFFIXES}")
-string(REGEX REPLACE "(${SUFFIXES})$" "" libpath ${libpath})
-  endif()
-  set(${libname} "${libpath}" PARENT_SCOPE)
-endfunction()
-
 if( MSVC OR MINGW )
   # libuuid required for FOLDERID_Profile usage in lib/Support/Windows/Path.inc.
   # advapi32 required for CryptAcquireContextW in lib/Support/Windows/Path.inc.
@@ -34,8 +21,10 @@
 STRING(REGEX REPLACE "^lib" "" Backtrace_LIBFILE ${Backtrace_LIBFILE})
 set(system_libs ${system_libs} ${Backtrace_LIBFILE})
   endif()
-  if( LLVM_ENABLE_TERMINFO )
-set(imported_libs ${imported_libs} "${TERMINFO_LIB}")
+  if(LLVM_ENABLE_TERMINFO)
+if(HAVE_TERMINFO)
+  set(system_libs ${system_libs} ${TERMINFO_LIBS})
+endif()
   endif()
   if( LLVM_ENABLE_THREADS AND (HAVE_LIBATOMIC OR HAVE_CXX_LIBATOMICS64) )
 set(system_libs ${system_libs} atomic)
@@ -220,15 +209,20 @@
   if(NOT zlib_library)
 get_property(zlib_library TARGET ZLIB::ZLIB PROPE

[Lldb-commits] [PATCH] D86521: Revert "Use find_library for ncurses"

2020-08-28 Thread Harmen Stoppels via Phabricator via lldb-commits
haampie added a comment.

@phosek it would be great to get that patch in, but the truth is it is 
difficult testing across multiple platforms for me; I can only test on Linux 
and macOS, not Windows (GNU). Since that patch would touch predefined, 
platform-dependent cmake variables, I would want to test it properly before 
submitting a patch, which might take a bit more time. So for me it would be 
best to temporarily accept this reverting patch, and submit a properly tested 
patch afterwards.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86521/new/

https://reviews.llvm.org/D86521

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D85820: Use find_library for ncurses

2020-09-02 Thread Harmen Stoppels via Phabricator via lldb-commits
haampie updated this revision to Diff 288864.
haampie added a comment.
Herald added a subscriber: danielkiss.

Another take on this isuse, incorporating @phosek's comment on making 
find_library not find shared libs when compiling with `LLVM_BUILD_STATIC=ON`, 
and making sure that `get_system_libname` does not add empty items to a regex 
capture group, as CMake's regex engine does not support this.

@gkistanova, can you test this on your build bot with the static llvm build?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85820/new/

https://reviews.llvm.org/D85820

Files:
  compiler-rt/cmake/config-ix.cmake
  compiler-rt/lib/xray/tests/CMakeLists.txt
  lldb/source/Core/CMakeLists.txt
  llvm/CMakeLists.txt
  llvm/cmake/config-ix.cmake
  llvm/include/llvm/Config/config.h.cmake
  llvm/lib/Support/CMakeLists.txt
  llvm/lib/Support/Unix/Process.inc
  llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn

Index: llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
===
--- llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
+++ llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
@@ -286,9 +286,9 @@
   }
 
   if (llvm_enable_terminfo) {
-values += [ "HAVE_TERMINFO=1" ]
+values += [ "LLVM_ENABLE_TERMINFO=1" ]
   } else {
-values += [ "HAVE_TERMINFO=" ]
+values += [ "LLVM_ENABLE_TERMINFO=" ]
   }
 
   if (llvm_enable_dia_sdk) {
Index: llvm/lib/Support/Unix/Process.inc
===
--- llvm/lib/Support/Unix/Process.inc
+++ llvm/lib/Support/Unix/Process.inc
@@ -313,7 +313,7 @@
   return getColumns();
 }
 
-#ifdef HAVE_TERMINFO
+#ifdef LLVM_ENABLE_TERMINFO
 // We manually declare these extern functions because finding the correct
 // headers from various terminfo, curses, or other sources is harder than
 // writing their specs down.
@@ -323,12 +323,12 @@
 extern "C" int tigetnum(char *capname);
 #endif
 
-#ifdef HAVE_TERMINFO
+#ifdef LLVM_ENABLE_TERMINFO
 static ManagedStatic TermColorMutex;
 #endif
 
 static bool terminalHasColors(int fd) {
-#ifdef HAVE_TERMINFO
+#ifdef LLVM_ENABLE_TERMINFO
   // First, acquire a global lock because these C routines are thread hostile.
   std::lock_guard G(*TermColorMutex);
 
Index: llvm/lib/Support/CMakeLists.txt
===
--- llvm/lib/Support/CMakeLists.txt
+++ llvm/lib/Support/CMakeLists.txt
@@ -2,6 +2,23 @@
   set(imported_libs ZLIB::ZLIB)
 endif()
 
+function(get_system_libname libpath libname)
+  get_filename_component(libpath ${libpath} NAME)
+  set(prefixes ${CMAKE_FIND_LIBRARY_PREFIXES})
+  set(suffixes ${CMAKE_FIND_LIBRARY_SUFFIXES})
+  list(FILTER prefixes EXCLUDE REGEX "^\\s*$")
+  list(FILTER suffixes EXCLUDE REGEX "^\\s*$")
+  if( prefixes )
+string(REPLACE ";" "|" prefixes "${prefixes}")
+string(REGEX REPLACE "^(${prefixes})" "" libpath ${libpath})
+  endif()
+  if( suffixes )
+string(REPLACE ";" "|" suffixes "${suffixes}")
+string(REGEX REPLACE "(${suffixes})$" "" libpath ${libpath})
+  endif()
+  set(${libname} "${libpath}" PARENT_SCOPE)
+endfunction()
+
 if( MSVC OR MINGW )
   # libuuid required for FOLDERID_Profile usage in lib/Support/Windows/Path.inc.
   # advapi32 required for CryptAcquireContextW in lib/Support/Windows/Path.inc.
@@ -21,10 +38,8 @@
 STRING(REGEX REPLACE "^lib" "" Backtrace_LIBFILE ${Backtrace_LIBFILE})
 set(system_libs ${system_libs} ${Backtrace_LIBFILE})
   endif()
-  if(LLVM_ENABLE_TERMINFO)
-if(HAVE_TERMINFO)
-  set(system_libs ${system_libs} ${TERMINFO_LIBS})
-endif()
+  if( LLVM_ENABLE_TERMINFO )
+set(imported_libs ${imported_libs} "${TERMINFO_LIB}")
   endif()
   if( LLVM_ENABLE_THREADS AND (HAVE_LIBATOMIC OR HAVE_CXX_LIBATOMICS64) )
 set(system_libs ${system_libs} atomic)
@@ -237,20 +252,15 @@
   if(NOT zlib_library)
 get_property(zlib_library TARGET ZLIB::ZLIB PROPERTY LOCATION)
   endif()
-  get_filename_component(zlib_library ${zlib_library} NAME)
-  if(CMAKE_STATIC_LIBRARY_PREFIX AND CMAKE_STATIC_LIBRARY_SUFFIX AND
-  zlib_library MATCHES "^${CMAKE_STATIC_LIBRARY_PREFIX}.*${CMAKE_STATIC_LIBRARY_SUFFIX}$")
-STRING(REGEX REPLACE "^${CMAKE_STATIC_LIBRARY_PREFIX}" "" zlib_library ${zlib_library})
-STRING(REGEX REPLACE "${CMAKE_STATIC_LIBRARY_SUFFIX}$" "" zlib_library ${zlib_library})
-  endif()
-  if(CMAKE_SHARED_LIBRARY_PREFIX AND CMAKE_SHARED_LIBRARY_SUFFIX AND
-  zlib_library MATCHES "^${CMAKE_SHARED_LIBRARY_PREFIX}.*${CMAKE_SHARED_LIBRARY_SUFFIX}$")
-STRING(REGEX REPLACE "^${CMAKE_SHARED_LIBRARY_PREFIX}" "" zlib_library ${zlib_library})
-STRING(REGEX REPLACE "${CMAKE_SHARED_LIBRARY_SUFFIX}$" "" zlib_library ${zlib_library})
-  endif()
+  get_system_libname(${zlib_library} zlib_library)
   set(llvm_system_libs ${llvm_system_libs} "${zlib_library}")
 endif()
 
+if(LLVM_ENABLE_TERMINFO)
+  get_system_libname(${TERMINFO_LIB} terminfo_library)
+  set(

[Lldb-commits] [PATCH] D87590: Backport D79219, D85820, D86134 to 10.0 branch

2020-09-16 Thread Harmen Stoppels via Phabricator via lldb-commits
haampie added a comment.

D86134  should not be added, it was reverted 
afterwards. What eventually landed was D85820 
, which adds a better fix for what D86134 
 was supposed to solve.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87590/new/

https://reviews.llvm.org/D87590

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D87590: Backport D79219, D85820, D86134 to 10.0 branch

2020-09-16 Thread Harmen Stoppels via Phabricator via lldb-commits
haampie added a comment.

Also note that the changes are not likely to be backported to 11 even: 
https://reviews.llvm.org/rG31e5f7120bdd2f76337686d9d169b1c00e6ee69c#942622


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87590/new/

https://reviews.llvm.org/D87590

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-01-27 Thread Harmen Stoppels via Phabricator via lldb-commits
haampie created this revision.
haampie added a reviewer: JDevlieghere.
Herald added a reviewer: bollu.
haampie requested review of this revision.
Herald added projects: clang, Sanitizers, LLDB, OpenMP, LLVM.
Herald added subscribers: llvm-commits, openmp-commits, lldb-commits, 
Sanitizers, cfe-commits.

Allow users to use a non-system version of perl, python and awk, which is 
useful in certain package managers.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95119

Files:
  clang/test/make_test_dirs.pl
  clang/tools/scan-build/bin/set-xcode-analyzer
  clang/utils/TestUtils/pch-test.pl
  clang/utils/analyzer/reducer.pl
  clang/utils/analyzer/update_plist_test.pl
  compiler-rt/utils/generate_netbsd_ioctls.awk
  compiler-rt/utils/generate_netbsd_syscalls.awk
  debuginfo-tests/llgdb-tests/test_debuginfo.pl
  lldb/docs/use/python-reference.rst
  lldb/scripts/disasm-gdb-remote.pl
  llvm/utils/GenLibDeps.pl
  llvm/utils/codegen-diff
  llvm/utils/findsym.pl
  llvm/utils/llvm-compilers-check
  llvm/utils/llvm-native-gxx
  openmp/runtime/tools/check-execstack.pl
  openmp/runtime/tools/check-instruction-set.pl
  openmp/runtime/tools/message-converter.pl
  polly/lib/External/isl/doc/mypod2latex

Index: polly/lib/External/isl/doc/mypod2latex
===
--- polly/lib/External/isl/doc/mypod2latex
+++ polly/lib/External/isl/doc/mypod2latex
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use strict;
 use Pod::LaTeX;
Index: openmp/runtime/tools/message-converter.pl
===
--- openmp/runtime/tools/message-converter.pl
+++ openmp/runtime/tools/message-converter.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 #
 #//===--===//
Index: openmp/runtime/tools/check-instruction-set.pl
===
--- openmp/runtime/tools/check-instruction-set.pl
+++ openmp/runtime/tools/check-instruction-set.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 #
 #//===--===//
Index: openmp/runtime/tools/check-execstack.pl
===
--- openmp/runtime/tools/check-execstack.pl
+++ openmp/runtime/tools/check-execstack.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 #
 #//===--===//
Index: llvm/utils/llvm-native-gxx
===
--- llvm/utils/llvm-native-gxx
+++ llvm/utils/llvm-native-gxx
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 # Wrapper around LLVM tools to generate a native .o from llvm-gxx using an
 # LLVM back-end (CBE by default).
 
Index: llvm/utils/llvm-compilers-check
===
--- llvm/utils/llvm-compilers-check
+++ llvm/utils/llvm-compilers-check
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 ##===- utils/llvmbuild - Build the LLVM project *-python-*-===##
 #
 # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
Index: llvm/utils/findsym.pl
===
--- llvm/utils/findsym.pl
+++ llvm/utils/findsym.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl -w
 #
 # Program:  findsym.pl
 #
Index: llvm/utils/codegen-diff
===
--- llvm/utils/codegen-diff
+++ llvm/utils/codegen-diff
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use Getopt::Std;
 $DEBUG = 0;
Index: llvm/utils/GenLibDeps.pl
===
--- llvm/utils/GenLibDeps.pl
+++ llvm/utils/GenLibDeps.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl -w
 #
 # Program:  GenLibDeps.pl
 #
Index: lldb/scripts/disasm-gdb-remote.pl
===
--- lldb/scripts/disasm-gdb-remote.pl
+++ lldb/scripts/disasm-gdb-remote.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use strict;
 
Index: lldb/docs/use/python-reference.rst
===
--- lldb/docs/use/python-reference.rst
+++ lldb/docs/use/python-reference.rst
@@ -595,7 +595,7 @@
 
 ::
 
-  #!/usr/bin/python
+  #!/usr/bin/env python
 
   import lldb
   import commands
@@ -703,7 +703,7 @@
 
 ::
 
-  #!/usr/bin/python
+  #!/usr/bin/env python
 
   import lldb
   import os
Index: debuginfo-tests/llgdb-tests/test_debuginfo.pl
===
--- debuginfo-tests/llgdb-tests/test_debuginfo.pl
+++ debuginfo-tests/llgdb-tests/test_debuginfo.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 #
 # This script tests debugg

[Lldb-commits] [PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-01-27 Thread Harmen Stoppels via Phabricator via lldb-commits
haampie added a comment.

@JDevlieghere, would you care to review? This is another instance of moving 
away from system binaries to whatever the user / package manager wants the 
build to use.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95119/new/

https://reviews.llvm.org/D95119

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D95119: Prefer /usr/bin/env xxx over /usr/bin/xxx where xxx = perl, python, awk

2021-01-29 Thread Harmen Stoppels via Phabricator via lldb-commits
haampie updated this revision to Diff 319871.
haampie added a comment.
Herald added a subscriber: arphaman.

I dropped the awk bits, since there's no portable way to do it there, and 
replaced all `perl -w` with `perl` and `use warnings`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95119/new/

https://reviews.llvm.org/D95119

Files:
  clang/test/make_test_dirs.pl
  clang/tools/scan-build/bin/set-xcode-analyzer
  clang/utils/TestUtils/pch-test.pl
  clang/utils/analyzer/reducer.pl
  clang/utils/analyzer/update_plist_test.pl
  clang/www/demo/index.cgi
  debuginfo-tests/llgdb-tests/test_debuginfo.pl
  lldb/docs/use/python-reference.rst
  lldb/scripts/disasm-gdb-remote.pl
  llvm/utils/GenLibDeps.pl
  llvm/utils/codegen-diff
  llvm/utils/findsym.pl
  llvm/utils/llvm-compilers-check
  llvm/utils/llvm-native-gxx
  openmp/runtime/tools/check-execstack.pl
  openmp/runtime/tools/check-instruction-set.pl
  openmp/runtime/tools/message-converter.pl
  polly/lib/External/isl/doc/mypod2latex

Index: polly/lib/External/isl/doc/mypod2latex
===
--- polly/lib/External/isl/doc/mypod2latex
+++ polly/lib/External/isl/doc/mypod2latex
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use strict;
 use Pod::LaTeX;
Index: openmp/runtime/tools/message-converter.pl
===
--- openmp/runtime/tools/message-converter.pl
+++ openmp/runtime/tools/message-converter.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 #
 #//===--===//
Index: openmp/runtime/tools/check-instruction-set.pl
===
--- openmp/runtime/tools/check-instruction-set.pl
+++ openmp/runtime/tools/check-instruction-set.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 #
 #//===--===//
Index: openmp/runtime/tools/check-execstack.pl
===
--- openmp/runtime/tools/check-execstack.pl
+++ openmp/runtime/tools/check-execstack.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 #
 #//===--===//
Index: llvm/utils/llvm-native-gxx
===
--- llvm/utils/llvm-native-gxx
+++ llvm/utils/llvm-native-gxx
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 # Wrapper around LLVM tools to generate a native .o from llvm-gxx using an
 # LLVM back-end (CBE by default).
 
Index: llvm/utils/llvm-compilers-check
===
--- llvm/utils/llvm-compilers-check
+++ llvm/utils/llvm-compilers-check
@@ -1,4 +1,4 @@
-#!/usr/bin/python3
+#!/usr/bin/env python3
 ##===- utils/llvmbuild - Build the LLVM project *-python-*-===##
 #
 # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
Index: llvm/utils/findsym.pl
===
--- llvm/utils/findsym.pl
+++ llvm/utils/findsym.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 #
 # Program:  findsym.pl
 #
@@ -8,6 +8,8 @@
 # Syntax:   findsym.pl  
 #
 
+use warnings;
+
 # Give first option a name.
 my $Directory = $ARGV[0];
 my $Symbol = $ARGV[1];
Index: llvm/utils/codegen-diff
===
--- llvm/utils/codegen-diff
+++ llvm/utils/codegen-diff
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use Getopt::Std;
 $DEBUG = 0;
Index: llvm/utils/GenLibDeps.pl
===
--- llvm/utils/GenLibDeps.pl
+++ llvm/utils/GenLibDeps.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/env perl
 #
 # Program:  GenLibDeps.pl
 #
Index: lldb/scripts/disasm-gdb-remote.pl
===
--- lldb/scripts/disasm-gdb-remote.pl
+++ lldb/scripts/disasm-gdb-remote.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use strict;
 
Index: lldb/docs/use/python-reference.rst
===
--- lldb/docs/use/python-reference.rst
+++ lldb/docs/use/python-reference.rst
@@ -595,7 +595,7 @@
 
 ::
 
-  #!/usr/bin/python
+  #!/usr/bin/env python
 
   import lldb
   import commands
@@ -703,7 +703,7 @@
 
 ::
 
-  #!/usr/bin/python
+  #!/usr/bin/env python
 
   import lldb
   import os
Index: debuginfo-tests/llgdb-tests/test_debuginfo.pl
===
--- debuginfo-tests/llgdb-tests/test_debuginfo.pl
+++ debuginfo-tests/llgdb-tests/test_debuginfo.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 #
 # This script tests debugging information generated by a compiler.
 # Input arguments
Index: clang/www/demo