Open gabrhell opened 2 years ago
I came across the following error when using MS-style inline assembly:
MS-style inline assembly is not available: Unable to find target for this triple (no targets are registered).
Example code:
int main(void) { __asm__ { nop nop nop } return 0; }
Example .ccls file:
-masm=intel -fasm-blocks --target=i386-pc-linux-elf
Consider the following screenshot:
This comment in another repository suggests that the error could be due to missing LLVM targets initialization.
Then I added initializations and compiled ccls:
llvm::InitializeAllTargets(); llvm::InitializeAllTargetMCs(); llvm::InitializeAllAsmPrinters(); llvm::InitializeAllAsmParsers();
The error disappeared!
git describe --tags --long
0.20210330-12-g74458915
14.0.6
ArchWSL (kernel release 5.10.16.3-microsoft-standard-WSL2)
NVIM v0.7.2
Nvim LSP client
Observed behavior
I came across the following error when using MS-style inline assembly:
Example code:
Example .ccls file:
Consider the following screenshot:
This comment in another repository suggests that the error could be due to missing LLVM targets initialization.
Then I added initializations and compiled ccls:
The error disappeared!
System information
git describe --tags --long
):0.20210330-12-g74458915
14.0.6
ArchWSL (kernel release 5.10.16.3-microsoft-standard-WSL2)
NVIM v0.7.2
Nvim LSP client