[PATCH] D46914: Run scan-view on systems with python3 as default python provider

2018-05-15 Thread Khem Raj via Phabricator via cfe-commits
raj.khem created this revision.
Herald added a subscriber: cfe-commits.

Linux Distros e.g. archlinux have started to use python3 as default python 
interpreter, therefore we need to be specific if we need python2


Repository:
  rC Clang

https://reviews.llvm.org/D46914

Files:
  tools/scan-view/bin/scan-view


Index: tools/scan-view/bin/scan-view
===
--- tools/scan-view/bin/scan-view
+++ tools/scan-view/bin/scan-view
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 
 """The clang static analyzer results viewer.
 """


Index: tools/scan-view/bin/scan-view
===
--- tools/scan-view/bin/scan-view
+++ tools/scan-view/bin/scan-view
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 
 """The clang static analyzer results viewer.
 """
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D44607: Recompute invalidated iterator in insertTargetAndModeArgs

2018-05-20 Thread Khem Raj via Phabricator via cfe-commits
raj.khem added a comment.

Can this be backported to release_60 branch too please ?


Repository:
  rL LLVM

https://reviews.llvm.org/D44607



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


[PATCH] D49466: Initial implementation of -fmacro-prefix-map and -ffile-prefix-map

2019-02-15 Thread Khem Raj via Phabricator via cfe-commits
raj.khem added inline comments.



Comment at: lib/CodeGen/CGDebugInfo.cpp:476
   for (const auto &Entry : DebugPrefixMap)
-if (Path.startswith(Entry.first))
-  return (Twine(Entry.second) + Path.substr(Entry.first.size())).str();
-  return Path.str();
+if (llvm::sys::path::replace_path_prefix(p, Entry.first, Entry.second))
+  break;

looking at llvm/lib/Support/Path.cpp replace_path_prefix() returns void but 
here inside if() it will expect a bool return value 


Repository:
  rC Clang

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

https://reviews.llvm.org/D49466



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


[PATCH] D49466: Initial implementation of -fmacro-prefix-map and -ffile-prefix-map

2019-02-15 Thread Khem Raj via Phabricator via cfe-commits
raj.khem added inline comments.



Comment at: lib/CodeGen/CGDebugInfo.cpp:476
   for (const auto &Entry : DebugPrefixMap)
-if (Path.startswith(Entry.first))
-  return (Twine(Entry.second) + Path.substr(Entry.first.size())).str();
-  return Path.str();
+if (llvm::sys::path::replace_path_prefix(p, Entry.first, Entry.second))
+  break;

raj.khem wrote:
> looking at llvm/lib/Support/Path.cpp replace_path_prefix() returns void but 
> here inside if() it will expect a bool return value 
nm I guess I needed to look into https://reviews.llvm.org/D56769 as well.


Repository:
  rC Clang

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

https://reviews.llvm.org/D49466



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


[PATCH] D65572: Fix static linking failure with --unwindlib=libunwind

2019-08-01 Thread Khem Raj via Phabricator via cfe-commits
raj.khem created this revision.
raj.khem added a reviewer: rengolin.
raj.khem added a project: clang.
Herald added subscribers: cfe-commits, jfb.

when trying to use llvm libunwind via clang driver option --unwindlib and using 
-static together, linking fails with missing symbols

  libunwind/src/RWMutex.hpp:68: undefined reference to `pthread_rwlock_wrlock'
  ..
  libunwind/src/AddressSpace.hpp:597: undefined reference to `dladdr'

There are missing symbols in linunwind.a which should be coming from libpthread 
and libdl


Repository:
  rC Clang

https://reviews.llvm.org/D65572

Files:
  clang/lib/Driver/ToolChains/CommonArgs.cpp


Index: clang/lib/Driver/ToolChains/CommonArgs.cpp
===
--- clang/lib/Driver/ToolChains/CommonArgs.cpp
+++ clang/lib/Driver/ToolChains/CommonArgs.cpp
@@ -1185,6 +1185,10 @@
   }
   case ToolChain::UNW_CompilerRT:
 CmdArgs.push_back("-lunwind");
+if (Args.hasArg(options::OPT_static)) {
+  CmdArgs.push_back("-lpthread");
+  CmdArgs.push_back("-ldl");
+}
 break;
   }
 


Index: clang/lib/Driver/ToolChains/CommonArgs.cpp
===
--- clang/lib/Driver/ToolChains/CommonArgs.cpp
+++ clang/lib/Driver/ToolChains/CommonArgs.cpp
@@ -1185,6 +1185,10 @@
   }
   case ToolChain::UNW_CompilerRT:
 CmdArgs.push_back("-lunwind");
+if (Args.hasArg(options::OPT_static)) {
+  CmdArgs.push_back("-lpthread");
+  CmdArgs.push_back("-ldl");
+}
 break;
   }
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D65572: Fix static linking failure with --unwindlib=libunwind

2019-08-04 Thread Khem Raj via Phabricator via cfe-commits
raj.khem added a comment.

In D65572#1610169 , @rengolin wrote:

> This is a tricky one which may vary depending on the libraries available on 
> different systems. Which toolchain is this? Can you add more context?


@rengolin this is when building linux system with glibc ( clang+clang-runtime 
which means it uses llvm libunwind too) it works fine with -lunwindlib=libgcc 
but llvm libunwind does have calls into libpthread and uses dlopen as well. I 
did not build non-linux systems so can not say if
its same issue on them too but on linux its the case. I am building Yocto/OE 
using clang as cross compiler.


Repository:
  rC Clang

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

https://reviews.llvm.org/D65572



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


[PATCH] D65572: Fix static linking failure with --unwindlib=libunwind

2019-08-04 Thread Khem Raj via Phabricator via cfe-commits
raj.khem added a comment.

In D65572#1614003 , @compnerd wrote:

> `-ldl` doesn't work on all platforms (e.g. android, FreeBSD, etc).  
> `-lpthread` is wrong - if you want to add that, I think that we need to 
> improve the `-thread-model` flag in clang first (it currently just always 
> passes `posix`, which is ignored; but would identify the threading model).  
> `-lpthread` is wrong - consider building on Solaris with Solaris threads 
> rather than POSIX threads, or on Windows with the Win32 threading.  This 
> really is inline with the work that needs to be finished up with having 
> library link dependencies for static libraries (i.e. `#pragma comment(lib, 
> …)`).


we are assuming llvm libunwind to have no other dependencies, but thats not the 
case atleast not on linux, I understand this code is in common area and will 
impact all, maybe this should be moved to toolchain specific argument 
processing, where we can then override it specifically for linux environment.


Repository:
  rC Clang

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

https://reviews.llvm.org/D65572



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


[PATCH] D71387: pass -mabi to LTO linker only in RISC-V targets, enable RISC-V LTO

2022-09-06 Thread Khem Raj via Phabricator via cfe-commits
raj.khem added a comment.

In D71387#3755056 , @lewis-revill 
wrote:

> I believe this patch is still relevant/necessary when using LTO for RISCV, so 
> can I ask if @khchen is able to update it to rebase/address the feedback? If 
> not, are there are any objections to me commandeering this revision to get it 
> landed?

yes indeed, its still needed. I have disabled LTO for RISCV in Yocto for this 
reason. I will be happy to test out a rebased patch along.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71387

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


[PATCH] D119590: exclude openembedded distributions from setting rpath on openmp executables

2022-03-10 Thread Khem Raj via Phabricator via cfe-commits
raj.khem added a comment.
Herald added a project: All.

In D119590#3316050 , @JonChesterfield 
wrote:

> Cross compilers are a hazard here. I'd expect there to be a fairly long list 
> of magic flags you need to pass to clang to get it to find the right 
> libraries. Can you add fno-openmp-implicit-rpath to that list instead?

hmmm, I would say the original patch made assumption about native compile is 
the only option, clang claims to be inherently cross compiler.  Anyway adding 
`-fno-openmp-implicit-rpath` would mean that all SDKs generated by 
OpenEmbedded/Yocto project will have to somehow specify this option by default 
as well. it might work for system builds by specifying in global CFLAGS or 
adding to CC var itself.

> A better solution might be a cmake flag to specify where to use for the 
> implicit rpath directory instead of deriving it from sys::path::parent_path. 
> That would let your target set up a cross compiling toolchain that creates 
> binaries that are able to find libomp et al in whatever directory they're 
> located, without assuming a whole llvm toolchain installed onto the target.

right. Cmake flag route seems a good one. I will explore it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119590

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


[PATCH] D119590: exclude openembedded distributions from setting rpath on openmp executables

2022-02-11 Thread Khem Raj via Phabricator via cfe-commits
raj.khem created this revision.
raj.khem added reviewers: jhuber6, JonChesterfield.
Herald added subscribers: guansong, yaxunl.
raj.khem requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: cfe-commits, sstefan1.
Herald added a project: clang.

OpenEmbedded based SDKs stage toolchains outsides the target rootfs and
libomp.so is part of the target rootfs and not part of compiler
toolchain install or relative to it. It finds the libraries via
--sysroot during compile. This ensures that -rpath is not added for such
systems, since it is adding cross-compile paths to rpath which is not
correct when the binaries are run on real targets.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119590

Files:
  clang/lib/Driver/ToolChains/CommonArgs.cpp


Index: clang/lib/Driver/ToolChains/CommonArgs.cpp
===
--- clang/lib/Driver/ToolChains/CommonArgs.cpp
+++ clang/lib/Driver/ToolChains/CommonArgs.cpp
@@ -648,6 +648,11 @@
 void tools::addOpenMPRuntimeSpecificRPath(const ToolChain &TC,
   const ArgList &Args,
   ArgStringList &CmdArgs) {
+  // OpenEmbedded/Yocto installs libomp.so into /usr/lib
+  // therefore using -rpath is not needed, on the contrary it adds
+  // paths from cross compiler install location which is not correct
+  if (TC.getTriple().getVendor() == llvm::Triple::OpenEmbedded)
+return;
 
   if (Args.hasFlag(options::OPT_fopenmp_implicit_rpath,
options::OPT_fno_openmp_implicit_rpath, true)) {


Index: clang/lib/Driver/ToolChains/CommonArgs.cpp
===
--- clang/lib/Driver/ToolChains/CommonArgs.cpp
+++ clang/lib/Driver/ToolChains/CommonArgs.cpp
@@ -648,6 +648,11 @@
 void tools::addOpenMPRuntimeSpecificRPath(const ToolChain &TC,
   const ArgList &Args,
   ArgStringList &CmdArgs) {
+  // OpenEmbedded/Yocto installs libomp.so into /usr/lib
+  // therefore using -rpath is not needed, on the contrary it adds
+  // paths from cross compiler install location which is not correct
+  if (TC.getTriple().getVendor() == llvm::Triple::OpenEmbedded)
+return;
 
   if (Args.hasFlag(options::OPT_fopenmp_implicit_rpath,
options::OPT_fno_openmp_implicit_rpath, true)) {
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D65699: [Driver] Prioritize SYSROOT/usr/include over RESOURCE_DIR/include on linux-musl

2019-09-08 Thread Khem Raj via Phabricator via cfe-commits
raj.khem added a comment.

Can we bring this to 9.x release branch as well please ?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D65699



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


[PATCH] D65699: [Driver] Prioritize SYSROOT/usr/include over RESOURCE_DIR/include on linux-musl

2019-09-08 Thread Khem Raj via Phabricator via cfe-commits
raj.khem added a comment.

one issue I now see is that when we have some thing like

static const struct {

  const wchar_t *name;
  int (*func)(EditLine *, int, const wchar_t **);
  } cmds[] = {
  { L"bind",  map_bind},
  { L"echotc",terminal_echotc },
  { L"edit",  el_editmode },
  { L"history",   hist_command},
  { L"telltc",terminal_telltc },
  { L"settc", terminal_settc  },
  { L"setty", tty_stty},
  { NULL, NULL}
  };

clang complains

warning: incompatible pointer types initializing 'const wchar_t *' (aka 'const 
long *') with an expression of type 'int [5]' [-Wincompatible-pointer-types]

  { L"bind",  map_bind},
^~~

it seems L"..." prefix is treated as `int`  where as in musl wchar_t is of long 
int type


Repository:
  rL LLVM

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

https://reviews.llvm.org/D65699



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


[PATCH] D65699: [Driver] Prioritize SYSROOT/usr/include over RESOURCE_DIR/include on linux-musl

2019-09-09 Thread Khem Raj via Phabricator via cfe-commits
raj.khem added a comment.

In D65699#1662915 , @dalias wrote:

> That's a separate issue of clang having a slight types-ABI mismatch with some 
> 32-bit archs whose original ABIs used `long` instead of `int` for `wchar_t`. 
> The wrong header order makes it quickly apparent, but these are independent; 
> wrong header order is still wrong and will break (other) things even without 
> this type mismatch. Backport of the fix would be much appreciated.


@dalias I agree its an issue that comes to fore due to this change and was 
latent, this however now fails to build libedit, which is a prerequisite for 
building clang itself, so its kind of pesky problem now.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D65699



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


[PATCH] D18174: Fix libcxx build on musl

2017-07-30 Thread Khem Raj via Phabricator via cfe-commits
raj.khem updated this revision to Diff 108853.
raj.khem edited the summary of this revision.
Herald added a reviewer: EricWF.

https://reviews.llvm.org/D18174

Files:
  include/__mutex_base


Index: include/__mutex_base
===
--- include/__mutex_base
+++ include/__mutex_base
@@ -48,7 +48,10 @@
 public:
 _LIBCPP_INLINE_VISIBILITY
 #ifndef _LIBCPP_CXX03_LANG
-constexpr mutex() = default;
+#ifdef __GLIBC__
+constexpr
+#endif
+mutex() = default;
 #else
 mutex() _NOEXCEPT {__m_ = (__libcpp_mutex_t)_LIBCPP_MUTEX_INITIALIZER;}
 #endif
@@ -296,7 +299,10 @@
 public:
 _LIBCPP_INLINE_VISIBILITY
 #ifndef _LIBCPP_CXX03_LANG
-constexpr condition_variable() _NOEXCEPT = default;
+#ifdef __GLIBC__
+constexpr
+#endif
+condition_variable() _NOEXCEPT = default;
 #else
 condition_variable() _NOEXCEPT {__cv_ = 
(__libcpp_condvar_t)_LIBCPP_CONDVAR_INITIALIZER;}
 #endif


Index: include/__mutex_base
===
--- include/__mutex_base
+++ include/__mutex_base
@@ -48,7 +48,10 @@
 public:
 _LIBCPP_INLINE_VISIBILITY
 #ifndef _LIBCPP_CXX03_LANG
-constexpr mutex() = default;
+#ifdef __GLIBC__
+constexpr
+#endif
+mutex() = default;
 #else
 mutex() _NOEXCEPT {__m_ = (__libcpp_mutex_t)_LIBCPP_MUTEX_INITIALIZER;}
 #endif
@@ -296,7 +299,10 @@
 public:
 _LIBCPP_INLINE_VISIBILITY
 #ifndef _LIBCPP_CXX03_LANG
-constexpr condition_variable() _NOEXCEPT = default;
+#ifdef __GLIBC__
+constexpr
+#endif
+condition_variable() _NOEXCEPT = default;
 #else
 condition_variable() _NOEXCEPT {__cv_ = (__libcpp_condvar_t)_LIBCPP_CONDVAR_INITIALIZER;}
 #endif
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D18174: Fix libcxx build on musl

2017-07-30 Thread Khem Raj via Phabricator via cfe-commits
raj.khem added a comment.

@EricWF you are right. I have made the changes accordingly. This patch can be 
ignored.


https://reviews.llvm.org/D18174



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


[PATCH] D35564: Suppress -pedantic warnings about GNU extension StmtExpr in glibc's assert macro

2017-07-31 Thread Khem Raj via Phabricator via cfe-commits
raj.khem added a comment.

There is a proposed fix for glibc's assert here

https://sourceware.org/ml/libc-alpha/2017-07/msg00227.html

despite that, this patch in general seems useful.


https://reviews.llvm.org/D35564



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


[PATCH] D71965: include missing for std::abort

2019-12-28 Thread Khem Raj via Phabricator via cfe-commits
raj.khem created this revision.
raj.khem added reviewers: kadircet, jfb.
raj.khem added a project: clang-tools-extra.
Herald added subscribers: cfe-commits, usaxena95, arphaman, dexonsmith, 
jkorous, ilya-biryukov.
Herald added a project: clang.

Fixes

TOPDIR/build/tmp/work-shared/llvm-project-source-10.0.0-r0/git/clang-tools-extra/clangd/Shutdown.cpp:21:10:
 error: no member named 'abort' in namespace 'std'

  std::abort();
  ~^

TOPDIR/build/tmp/work-shared/llvm-project-source-10.0.0-r0/git/clang-tools-extra/clangd/Shutdown.cpp:30:10:
 error: no member named 'abort' in namespace 'std'

  std::abort();
  ~^


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D71965

Files:
  clang-tools-extra/clangd/Shutdown.cpp


Index: clang-tools-extra/clangd/Shutdown.cpp
===
--- clang-tools-extra/clangd/Shutdown.cpp
+++ clang-tools-extra/clangd/Shutdown.cpp
@@ -9,6 +9,7 @@
 #include "Shutdown.h"
 
 #include 
+#include 
 #include 
 
 namespace clang {


Index: clang-tools-extra/clangd/Shutdown.cpp
===
--- clang-tools-extra/clangd/Shutdown.cpp
+++ clang-tools-extra/clangd/Shutdown.cpp
@@ -9,6 +9,7 @@
 #include "Shutdown.h"
 
 #include 
+#include 
 #include 
 
 namespace clang {
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D70764: build: reduce CMake handling for zlib

2020-01-03 Thread Khem Raj via Phabricator via cfe-commits
raj.khem added a comment.

this is now in master, and I am seeing build failures in cross-building clang, 
e.g. when building clang for arm on a x86_64 host. its resorting to finding, 
libz from buildhost instead of target sysroot ( using --sysroot) and failing in 
link step. e.g.

FAILED: bin/llvm-config
...
 -o bin/llvm-config  -Wl,-rpath,"\$ORIGIN/../lib"  lib/libLLVMSupport.a  
/usr/lib/libz.so  -lrt  -ldl  -ltinfo  -lm  lib/libLLVMDemangle.a
...

aarch64-yoe-linux-musl/aarch64-yoe-linux-musl-ld: /usr/lib/libz.so: error 
adding symbols: file in wrong format
clang-10: error: linker command failed with exit code 1 (use -v to see 
invocation)

you can see that its adding /usr/lib/libz.so to linker cmdline while cross 
linking.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70764



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


[PATCH] D70764: build: reduce CMake handling for zlib

2020-01-07 Thread Khem Raj via Phabricator via cfe-commits
raj.khem added a comment.

In D70764#1807405 , @smeenai wrote:

> In D70764#1803559 , @raj.khem wrote:
>
> > this is now in master, and I am seeing build failures in cross-building 
> > clang, e.g. when building clang for arm on a x86_64 host. its resorting to 
> > finding, libz from buildhost instead of target sysroot ( using --sysroot) 
> > and failing in link step. e.g.
> >
> > FAILED: bin/llvm-config
> >  ...
> >   -o bin/llvm-config  -Wl,-rpath,"\$ORIGIN/../lib"  
> > lib/libLLVMSupport.a  /usr/lib/libz.so  -lrt  -ldl  -ltinfo  -lm  
> > lib/libLLVMDemangle.a
> >  ...
> >
> > aarch64-yoe-linux-musl/aarch64-yoe-linux-musl-ld: /usr/lib/libz.so: error 
> > adding symbols: file in wrong format
> >  clang-10: error: linker command failed with exit code 1 (use -v to see 
> > invocation)
> >
> > you can see that its adding /usr/lib/libz.so to linker cmdline while cross 
> > linking.
>
>
> Have you set `CMAKE_SYSROOT` appropriately?


That is not the problem. Since in cases of target its finding is properly.
there are multiple pieces where some are being built for native( build host) 
some for target so it thinks its building for
buildhost (native) llvm-config e.g. is one such case. Replacing it with -lz 
fixes it becasue compile environment is providing
right --sysroot for native or cross cases and it always links with correct libs.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70764



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


[PATCH] D102568: [Driver] Delete -mimplicit-it=

2021-05-17 Thread Khem Raj via Phabricator via cfe-commits
raj.khem accepted this revision.
raj.khem added a comment.

LGTM


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102568

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


[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-06-04 Thread Khem Raj via Phabricator via cfe-commits
raj.khem added a comment.

http://sprunge.us/FJzZXL is a file from harfbuzz and it warns

  a.cc:28670:32: error: variable 'supp_size' set but not used 
[-Werror,-Wunused-but-set-variable]
  unsigned int size0, size1, supp_size = 0;

I do not have -Werror enabled but it still is reported as error. There is no 
way to disable this warning ?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100581

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


[PATCH] D140875: [clangd] prototype: Implement unused include warnings with include-cleaner library.

2023-01-19 Thread Khem Raj via Phabricator via cfe-commits
raj.khem added a comment.

In D140875#4065824 , @hokein wrote:

> In D140875#4065763 , @ckandeler 
> wrote:
>
>> With this, I now get:
>> FAILED: bin/clangd-fuzzer 
>> : && /usr/lib/icecream/libexec/icecc/bin/c++ -fPIC 
>> -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time 
>> -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
>> -Wno-missing-field-initializers -pedantic -Wno-long-long 
>> -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess 
>> -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type 
>> -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment 
>> -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color 
>> -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual 
>> -fno-strict-aliasing -O2 -g -DNDEBUG -fuse-ld=lld -Wl,--color-diagnostics
>> -Wl,--gc-sections 
>> tools/clang/tools/extra/clangd/fuzzer/CMakeFiles/clangd-fuzzer.dir/FuzzerClangdMain.cpp.o
>>  
>> tools/clang/tools/extra/clangd/fuzzer/CMakeFiles/clangd-fuzzer.dir/clangd-fuzzer.cpp.o
>>  -o bin/clangd-fuzzer  -Wl,-rpath,"\$ORIGIN/../lib"  lib/libclangDaemon.a  
>> lib/libclangdSupport.a  lib/libclangPseudo.a  lib/libclangPseudoGrammar.a  
>> lib/libclangTidyAndroidModule.a  lib/libclangTidyAbseilModule.a  
>> lib/libclangTidyAlteraModule.a  lib/libclangTidyBoostModule.a  
>> lib/libclangTidyCERTModule.a  lib/libclangTidyConcurrencyModule.a  
>> lib/libclangTidyDarwinModule.a  lib/libclangTidyFuchsiaModule.a  
>> lib/libclangTidyHICPPModule.a  lib/libclangTidyBugproneModule.a  
>> lib/libclangTidyCppCoreGuidelinesModule.a  lib/libclangTidyGoogleModule.a  
>> lib/libclangTidyLinuxKernelModule.a  lib/libclangTidyLLVMModule.a  
>> lib/libclangTidyLLVMLibcModule.a  lib/libclangTidyMiscModule.a  
>> lib/libclangAnalysis.a  lib/libclangASTMatchers.a  lib/libclangAST.a  
>> lib/libclangLex.a  lib/libclangBasic.a  lib/libclangTidyModernizeModule.a  
>> lib/libclangTidyObjCModule.a  lib/libclangTidyOpenMPModule.a  
>> lib/libclangTidyPerformanceModule.a  lib/libclangTidyPortabilityModule.a  
>> lib/libclangTidyReadabilityModule.a  lib/libclangTidyZirconModule.a  
>> lib/libclangTidyMPIModule.a  lib/libclangTidyUtils.a  lib/libclangTidy.a  
>> lib/libclang-cpp.so.16git  lib/libLLVM-16git.so && :
>> ld.lld: error: undefined symbol: 
>> clang::include_cleaner::walkUsed(llvm::ArrayRef, 
>> llvm::ArrayRef, 
>> clang::include_cleaner::PragmaIncludes const*, clang::SourceManager const&, 
>> llvm::function_ref> llvm::ArrayRef)>)
>>
> referenced by IncludeCleaner.cpp:504 
> (/sda/home/christian/dev/llvm/clang-tools-extra/clangd/IncludeCleaner.cpp:504)
>
>   
> IncludeCleaner.cpp.o:(clang::clangd::computeUnusedIncludesExperimental(clang::clangd::ParsedAST&)
>  (.localalias)) in archive lib/libclangDaemon.a
>
> sorry, should be fixed in 
> https://github.com/llvm/llvm-project/commit/e84d69f52d9a9fab9162128d8fe8ebec99ea60da.

this seems to be not enough, I am also seeing clangd build failiures

  /mnt/b/yoe/master/build/tmp/hosttools/ld: 
lib/libclangDaemon.a(Preamble.cpp.o): in function `clang::clangd::(anonymous 
namespace)::CppFilePreambleCallbacks::BeforeExecute(clang::CompilerInstance&)':
  
Preamble.cpp:(.text._ZN5clang6clangd12_GLOBAL__N_124CppFilePreambleCallbacks13BeforeExecuteERNS_16CompilerInstanceE+0x8b):
 undefined reference to 
`clang::include_cleaner::PragmaIncludes::record(clang::CompilerInsta
  nce const&)'
  /mnt/b/yoe/master/build/tmp/hosttools/ld: 
lib/libclangDaemon.a(IncludeCleaner.cpp.o): in function 
`clang::clangd::computeUnusedIncludesExperimental(clang::clangd::ParsedAST&) 
[clone .localalias]':
  
IncludeCleaner.cpp:(.text._ZN5clang6clangd33computeUnusedIncludesExperimentalERNS0_9ParsedASTE+0x3a1):
 undefined reference to 
`clang::include_cleaner::walkUsed(llvm::ArrayRef, 
llvm::ArrayRef, clang::include_cleaner::PragmaIncludes 
const*, clang::SourceManager const&, llvm::function_ref)>)'
  collect2: error: ld returned 1 exit status
  [193/193] Linking CXX executable bin/clangd
  FAILED: bin/clangd


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140875

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


[PATCH] D145302: [clangd] Add library for clangd main function

2023-07-11 Thread Khem Raj via Phabricator via cfe-commits
raj.khem added a comment.

indeed, broke my CI with same issue.

In D145302#4491973 , @glandium wrote:

> This broke building with `-DLLVM_LINK_LLVM_DYLIB=ON`:
>
>   /usr/bin/ld: 
> tools/clang/tools/extra/clangd/refactor/tweaks/CMakeFiles/obj.clangDaemonTweaks.dir/AddUsing.cpp.o:
>  in function `clang::clangd::(anonymous 
> namespace)::AddUsing::prepare(clang::clangd::Tweak::Selection const&)':
>   
> AddUsing.cpp:(.text._ZN5clang6clangd12_GLOBAL__N_18AddUsing7prepareERKNS0_5Tweak9SelectionE+0x1c):
>  undefined reference to `clang::clangd::ParsedAST::getASTContext()'
>   /usr/bin/ld: 
> AddUsing.cpp:(.text._ZN5clang6clangd12_GLOBAL__N_18AddUsing7prepareERKNS0_5Tweak9SelectionE+0x6d):
>  undefined reference to `clang::clangd::ParsedAST::getASTContext() const'
>   /usr/bin/ld: 
> AddUsing.cpp:(.text._ZN5clang6clangd12_GLOBAL__N_18AddUsing7prepareERKNS0_5Tweak9SelectionE+0x9a):
>  undefined reference to `clang::clangd::isHeaderFile(llvm::StringRef, 
> std::optional)'
>   /usr/bin/ld: 
> AddUsing.cpp:(.text._ZN5clang6clangd12_GLOBAL__N_18AddUsing7prepareERKNS0_5Tweak9SelectionE+0xcc):
>  undefined reference to `clang::clangd::SelectionTree::commonAncestor() const'
>   /usr/bin/ld: 
> AddUsing.cpp:(.text._ZN5clang6clangd12_GLOBAL__N_18AddUsing7prepareERKNS0_5Tweak9SelectionE+0x391):
>  undefined reference to 
> `clang::clangd::printNamespaceScope[abi:cxx11](clang::DeclContext const&)'
>
> etc.




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145302

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


[PATCH] D71369: Detect libdl from cmake variable

2019-12-11 Thread Khem Raj via Phabricator via cfe-commits
raj.khem created this revision.
raj.khem added a reviewer: espindola.
Herald added subscribers: cfe-commits, mgorny.
Herald added a project: clang.

This helps in getting right settings for libdl irrespective of platform
it also fixes build with -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON

Fixes

tools/clang/tools/libclang/CMakeFiles/libclang.dir/CIndexer.cpp.o: In function 
clang::CIndexer::getClangResourcesPath[abi:cxx11]()': 
2019-12-06T06:04:39.2987601Z | 
CIndexer.cpp:(.text._ZN5clang8CIndexer21getClangResourcesPathB5cxx11Ev+0x8b): 
undefined reference to dladdr'


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D71369

Files:
  clang/tools/libclang/CMakeLists.txt


Index: clang/tools/libclang/CMakeLists.txt
===
--- clang/tools/libclang/CMakeLists.txt
+++ clang/tools/libclang/CMakeLists.txt
@@ -60,9 +60,8 @@
   endif()
 endif ()
 
-find_library(DL_LIBRARY_PATH dl)
-if (DL_LIBRARY_PATH)
-  list(APPEND LIBS dl)
+if (HAVE_LIBDL)
+  list(APPEND LIBS ${CMAKE_DL_LIBS})
 endif()
 
 option(LIBCLANG_BUILD_STATIC


Index: clang/tools/libclang/CMakeLists.txt
===
--- clang/tools/libclang/CMakeLists.txt
+++ clang/tools/libclang/CMakeLists.txt
@@ -60,9 +60,8 @@
   endif()
 endif ()
 
-find_library(DL_LIBRARY_PATH dl)
-if (DL_LIBRARY_PATH)
-  list(APPEND LIBS dl)
+if (HAVE_LIBDL)
+  list(APPEND LIBS ${CMAKE_DL_LIBS})
 endif()
 
 option(LIBCLANG_BUILD_STATIC
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D149272: [clang] Call printName to get name of Decl

2023-04-26 Thread Khem Raj via Phabricator via cfe-commits
raj.khem added a comment.

This would fix https://github.com/llvm/llvm-project/issues/62192


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149272

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


[PATCH] D18174: Fix libcxx build on musl

2021-03-24 Thread Khem Raj via Phabricator via cfe-commits
raj.khem abandoned this revision.
raj.khem added a comment.

this is no longer needed.


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

https://reviews.llvm.org/D18174

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


[PATCH] D46914: Run scan-view on systems with python3 as default python provider

2021-03-24 Thread Khem Raj via Phabricator via cfe-commits
raj.khem abandoned this revision.
raj.khem added a comment.

it works with python3 too, perhaps it would be good to ask for python3 instead


Repository:
  rC Clang

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

https://reviews.llvm.org/D46914

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


[PATCH] D71369: Detect libdl from cmake variable

2021-03-24 Thread Khem Raj via Phabricator via cfe-commits
raj.khem abandoned this revision.
raj.khem added a comment.

0073c293a401774ac96b4b3d27f05e13f379f98e 
 has fixed 
it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71369

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


[PATCH] D65572: Fix static linking failure with --unwindlib=libunwind

2021-03-24 Thread Khem Raj via Phabricator via cfe-commits
raj.khem added a comment.

@MaskRay how should be proceeed here


Repository:
  rC Clang

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

https://reviews.llvm.org/D65572

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


[PATCH] D99308: [Triple][Driver] Add muslx32 environment and use /lib/ld-musl-x32.so.1 for -dynamic-linker

2021-03-24 Thread Khem Raj via Phabricator via cfe-commits
raj.khem accepted this revision.
raj.khem added a comment.
This revision is now accepted and ready to land.

once you fix the clang-format issue reported this looks good to me.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99308

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