Questions tagged [llvm-clang]

Clang is the C language family front-end for the LLVM compiler. (The C language family includes C, C++, Objective-C, and Objective-C++.)

Clang refers to the C language family front-end for the LLVM (originally known as "low level virtual machine") compiler. The C language family consists of C, C++, Objective-C, and Objective-C++.

High-level features of clang include better compile-time performance than gcc, helpful error and warning messages, and a static analyzer to automatically detect software bugs.

1101 questions
6
votes
2 answers

what is the right abstraction for compilation unit in LLVM?

in LLVM we have the LLVMContext, which is the unit of storage, and we have the llvm::Module, which is where new symbols (functions and types) are built. my question is; what is the right llvm abstraction to use for compilation units? is the Module?…
lurscher
  • 25,930
  • 29
  • 122
  • 185
6
votes
1 answer

Error: package or namespace load failed for ‘data.table’ in library.dynam(lib, package, package.lib): shared object ‘datatable.so’ not found

install.packages("data.table") trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.5/data.table_1.12.8.tgz' Content type 'application/x-gzip' length 2117137 bytes (2.0 MB) downloaded 2.0 MB The downloaded binary packages are in …
Zawir Amin
  • 119
  • 1
  • 10
6
votes
1 answer

Non-modular headers of OpenSSL library when using modulemap for Swift framework

I'm trying to link statically OpenSSL library to my Swift framework, using XCode. Most approaches mentioned online are not correct, because they suggest using Import path (SWIFT_INCLUDE_PATHS). As a result, the framework binary is locked to a…
Lukas1
  • 582
  • 1
  • 5
  • 28
6
votes
1 answer

Building libc++ with MemorySanitizer instrumentation fails due to MemorySanitizer warning

I'm trying to build libc++ with MemorySanitizer instrumentation so that I can build my own projects with MemorySanitizer. I am using Clang 8.01 on Ubuntu 16.04. I followed the instructions given here, but the build initially failed with a linker…
Daniel
  • 376
  • 2
  • 7
6
votes
2 answers

Where to find list of available options for Clang-tidy "readability-identifier-naming" checker?

Use case I want to configure readability-identifier-naming checker for clang-tidy running on my codebase. Background The checker in clang-tidy can be provided with CheckOptions, such like: clang-tidy -checks='-*,readability-identifier-naming' \…
Bartek
  • 71
  • 1
  • 3
6
votes
0 answers

Clang build failing with FAILED: lib/libLTO.so.7

I have been trying to build clang but after running for 36 hours it fails with following error: [3840/4138] Linking CXX shared library lib/libLTO.so.7 FAILED: lib/libLTO.so.7 : && /usr/local/bin/clang++ -fPIC -fPIC -fvisibility-inlines-hidden…
Tehreem
  • 939
  • 2
  • 14
  • 31
6
votes
1 answer

Android NDK Linker failure for armeabi-v7a: "PLT offset too large, try linking with --long-plt"

When trying to build a signed APK, it fails with ~100 lines repeating: Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error:…
GetSwifty
  • 7,568
  • 1
  • 29
  • 46
6
votes
2 answers

Xcode 10 how to use new build system with obfuscator-llvm plugin

I follow tutorial from integration-into-xcode, it worked for Xcode 9, In Xcode 10, Select File -> Project/Workspace Setting, there is a Build System option, the new build system is selected as default, with this default setting, the clang path is…
gabbler
  • 13,626
  • 4
  • 32
  • 44
6
votes
2 answers

Clang 3.8 error: invalid linker name in argument '-fuse-ld=gold-2.25'

I am using Clang 3.8 on CentOS 7.4 to compile a C++ app using third party libraries and their (complicated) makefiles. When including their makefile and running my own I am getting the following error during linkage: clang-3.8: error: invalid linker…
user997112
  • 29,025
  • 43
  • 182
  • 361
6
votes
1 answer

Clang: reliably detect supported C++ standard from command line or Python

In a Python script, I am trying to determine the highest C++ standard supported by the installed Clang. One problem is that I cannot rely on the output of clang --version to always be the same - the best example is AppleClang on OSX. Trying to…
GPMueller
  • 2,881
  • 2
  • 27
  • 36
6
votes
1 answer

how to build BPF program out of the kernel tree

The kernel provides a number of examples in samples/bpf. I am interested in building one of examples outside of the tree, just like we build a kernel module, where Makefile can be simple enough. Is it possible to do the same with bpf? I tried it by…
Mark
  • 6,052
  • 8
  • 61
  • 129
6
votes
0 answers

Clang-tidy check like LLVMHeaderGuardCheck but for configurable include paths?

Anyone know of any sources for a LLVMHeaderGuardCheck like clang-tidy check that formats the expected include guards based on configurable information like the include path(s) given on the command line? More details... The LLVMHeaderGuardCheck…
Louis Langholtz
  • 2,913
  • 3
  • 17
  • 40
6
votes
2 answers

llvm 5.0 linking error with llvm::Module::dump()

I was trying to link LLVM with My C++ project for the past two days and it's finally working but the issue is when i use dump() method it gives a linker error i thought the problem is with the libraries that i'm linking against, so i've linked my…
yazan daba
  • 219
  • 5
  • 11
6
votes
2 answers

Fatal Error building the llvm source code in Ubuntu

I am trying to build LLVM source code on Ubuntu 16.04. I have tried versions 4.0.1, 4.0.0 and 3.9.0 with sources from here. I have also tried using the source from svn as shown in several tutorials. Here is the error I get : [1480/1747] Linking CXX…
Kapil Gupta
  • 7,091
  • 5
  • 16
  • 25
6
votes
2 answers

How to get actual value of global variables in llvm

For example: int x=0; int y=0; where x and y are global variables, and in main() function we do the following: x++; y++; How to get the newest value of global variables x and y in llvm. when I try to do errs()<
R.Omar
  • 645
  • 1
  • 6
  • 18