119 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
93
views
Why does `-fuse-ld=lld` when targeting `aarch64-unknown-linux-musl` cause the binary to dynamically-link the interpreter?
I've got a working Rust cross-compile setup on Arch Linux, targeting x86_64-unknown-linux-musl and aarch64-unknown-linux-musl from a x86_64 host.
By default, binaries for both targets are fully ...
0
votes
2
answers
87
views
Which design pattern can use for search overloading function? [closed]
In a interview, someone asked me this situation. How can you improve this.
search with many filter condition design pattern
Eg: let say search a gym by it distance, by its pincode, by its name, by its ...
0
votes
0
answers
22
views
Can the target provided for TARGET_LINK_LIBRARIES change its library dependencies using set_target_properties?
I'm building mariadb on ARM64 Windows using LLVM toolset, I had a duplicate symbol error, such as:
lld-link : error : duplicate symbol: my_strtoll10 [xx\server\llvm_arm64_release\sql\server.vcxproj]
...
2
votes
0
answers
274
views
Unable to cross compile simple C program using clang and lld
$ cat hello.c
int main ()
{
return 0;
}
$ clang -fuse-ld=lld -target ppc64le hello.c -o hello.o
ld.lld: error: /tmp/hello-37cf01.o is incompatible with elf64-x86-64
collect2: error: ld ...
0
votes
1
answer
87
views
lld cannot find -lgtest -lgtest_main
My environment is wsl2 Ubuntu22.04 LTS, compiler is clang-18.1.8, ld is LLD 18.1.8
However, when I compile my program, the ld output:
: && /usr/local/bin/clang++ -fPIC -stdlib=libc++ -g -Wall -...
-1
votes
1
answer
140
views
LLVM linker does not work on MacOS while trying to develop on-chain Solana app (C++)
this is the error i get:
./account_logger.so ()
dyld[61282]: Library not loaded: @rpath/libLLVM.dylib
Referenced from: <A9E4BE2A-BF8D-3956-BCA9-E3BC5A6C9F9C> /Users/myusername/.local/share/...
1
vote
1
answer
445
views
`__DATA_CONST` error while linking library to pybind11 module on Mac OS M1
I am trying to develop a library for Mac OS for scientific computation. It works and compiles file on Linux, but for some reason I am getting weird errors on Mac.
ld: __DATA_CONST segment missing ...
0
votes
1
answer
397
views
How can I configure the linker in CMake so that it uses g++ instead of ar + c++?
My problem is, that I want to use lld as dropin linker in my mingw installation. So I've copied the lld.exe as lld.exe, ld.lld.exe and lld-link.exe to my mingw bin directory (only one of them is ...
0
votes
0
answers
188
views
llvm18 ffat-lto-objects undefined vtables
Hi there!
I am porting a project from an old c++ version to a new one, using the newly went out llvm 18 suite.
For this, I would like to enable LTO optimizations, however, due to practical reasons, I ...
0
votes
0
answers
130
views
LLD: How to Use –dll and –add-stdcall-alias Swiches
I tried to build a project using LLVM that is originally built using GCC, but I met some errors related to LLD when linking. It uses --dll and --add-stdcall-alias to the linker, but LLD can't ...
1
vote
1
answer
222
views
How can I get clang compiler / lld linker for riscv32 to not use an lui for every memory address in the same range?
I'm writing a standalone program for a risc-v core that has many writes and reads to two different memory ranges. (One range is for ram, and the other is for peripherals. Maybe there will be more ...
0
votes
1
answer
294
views
ld can't find symbol, but lld can, why? (MinGW64 library on MSYS2)
On the MSYS2 shell, ld fails to link a simple binary:
$ clang++ -iquote /mingw64/include -L /mingw64/lib -lLLVM-16 -x c++ - <<<$'#include "llvm/Support/raw_ostream.h"\nint main() { ...
0
votes
1
answer
72
views
Object not callable in Python Abstraction
Hi can someone tell me why the below code shows the error, I think this should run fine -
from abc import ABC, abstractmethod
class DriveStrategy(ABC):
@abstractmethod
def drive_strategy(self):...
-2
votes
1
answer
69
views
What is the design approach for this problem statement? [closed]
Currently there are 200 customers and each of them have their own code base which has almost exact same code. The level of differences are as follows
There are values in app.config and based on that ...
1
vote
2
answers
1k
views
Why does MSVC Linker (and lld-link) behave weirdly when entry point is manually set?
I was trying to compile a program in Windows using clang so that I can use cmdline options similar to gcc while statically linking to the UCRT library (ucrt.lib). Besides, I also want to specify the ...