question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fallback compile flags

See original GitHub issue

There is an option in the LSP called initializationOptions.fallbackFlags which allows you to pass some fallback compile flags via the LSP if no infos is found in the compile_commands.json.

Would it be possible to enable that?

My problem is that I’m compiling some .cu files to some .ptx and CMake doesn’t register the compilation flags given to nvcc for those files into the compile_commands.json. Therefore clangd raises a bunch of errors due to missing flags (-std=c++11 among others).

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
cgurpscommented, Apr 29, 2020

source

0reactions
fannheywardcommented, Apr 29, 2020

@cgurps @sam-mccall I’ve added fallbackFlags according the document, but haven’t test it works or not, please give it a review and test #38

Read more comments on GitHub >

github_iconTop Results From Across the Web

Clangd - how to set default flags to be used when there is no ...
If all files in a project use the same build flags, ... Clangd will assume the compile command is clang $FLAGS some_file.cc.
Read more >
Optimize Options (Using the GNU Compiler Collection (GCC))
Turning on optimization flags makes the compiler attempt to improve the performance and/or code size at the expense of compilation time and possibly...
Read more >
llvm fallback code computes wrong build flags #4102 - GitHub
While preparing a backport of meson for stretch, I noticed that the test-suite failed: ...
Read more >
build:fallbacks [Tips for ABINIT users and developers]
Building the fallbacks within Abinit is mainly of interest to developers who want to experiment with compile flags and explore issues related to ......
Read more >
The clang-cl /fallback mode - The LLVM Project Blog
The purpose of this flag is to make it easy to use clang-cl even in projects where Clang cannot yet compile all of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found