unleashed-firmware/scripts/fbt_tools
dogtopus a7f0f5ad27
Improve vscode clangd experience (#2431)
* Improve vscode clangd experience

- Resolve and use absolute path for the toolchain. This allows clangd to use compile_commands.json file without running under fbtenv, simplifies setup for vscode clangd extension. As a side effect, a rebuild is needed to update compile_commands.json after moving the source tree.
- Add the recommended default settings of the extension to settings.json.

* Use build/latest for compile-commands-dir

This makes it behave closer to c-cpp-properties.

* Reformat crosscc.py

This is a PEP-8 violation but black seems to enforce it

* Bypass --query-driver

This has some security implications as it grants clangd the ability to execute any executables anywhere while trying to probe a compiler based on CDB. However it's very hard to do this the safe and intended way without resorting to config generation due to reason listed in #2431. Besides that we already have workspace trust so what could go wrong? ;)

* Add an option for vscode_dist to switch between clangd and cpptools

This will install different extensions.json tuned for either clangd or cpptools based on user selection. It will also install c_cpp_properties.json when using cpptools since clangd doesn't use this file.

The root .gitignore now also doesn't accidentally ignore everything under the .vscode directory.

* Use absolute path for .vscode gitignore

Turns out the previously used "relative" paths aren't even valid gitignore patterns and to actually do what it means one needs to use the absolute paths instead.

* Handle variable parsing in commandline.scons

commandline.scons is the place where all other command line parsing happens. Move LANG_SERVER variable parsing there and add a constraint to make the code more consistent.

---------

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: hedger <hedger@nanode.su>
2023-08-16 05:23:09 +04:00
..
blackmagic.py [FL-2832] fbt: more fixes & improvements (#1854) 2022-10-13 01:12:05 +09:00
ccache.py [FL-3174] Dolphin builder in ufbt; minor ufbt/fbt improvements (#2601) 2023-05-03 14:48:49 +09:00
compilation_db.py fbt: compile_db fixes (#1981) 2022-11-07 23:54:41 +09:00
crosscc.py Improve vscode clangd experience (#2431) 2023-08-16 05:23:09 +04:00
fbt_apps.py ufbt: deploying sample ufbt automation for new apps; added source "ufbt -s env" for toolchain access (#2648) 2023-05-08 20:01:52 +09:00
fbt_assets.py ufbt: fixed FAP_SRC_DIR (#2970) 2023-08-11 01:21:56 +09:00
fbt_debugopts.py Debug: revert cortex debug to lxml and drop DWT (#2651) 2023-05-09 03:31:44 +04:00
fbt_dist.py [FL-3346] fbt: added Flipper selection when multiple are connected over USB (#2723) 2023-06-08 13:47:27 +09:00
fbt_envhooks.py [FL-3330] fbt: added hooks for build & dist environments; added FW_ORIGIN_* macro for apps & SDK (#2705) 2023-05-30 01:40:56 +09:00
fbt_extapps.py ufbt: fixed FAP_SRC_DIR (#2970) 2023-08-11 01:21:56 +09:00
fbt_help.py [FL-3437] fbt: build target for faps (#2888) 2023-07-18 13:39:30 +04:00
fbt_hwtarget.py [FL-3174] Dolphin builder in ufbt; minor ufbt/fbt improvements (#2601) 2023-05-03 14:48:49 +09:00
fbt_sdk.py [FL-3174] Dolphin builder in ufbt; minor ufbt/fbt improvements (#2601) 2023-05-03 14:48:49 +09:00
fbt_tweaks.py [FL-3174] Dolphin builder in ufbt; minor ufbt/fbt improvements (#2601) 2023-05-03 14:48:49 +09:00
fbt_version.py [FL-3330] fbt: added hooks for build & dist environments; added FW_ORIGIN_* macro for apps & SDK (#2705) 2023-05-30 01:40:56 +09:00
fwbin.py [FL-3174] Dolphin builder in ufbt; minor ufbt/fbt improvements (#2601) 2023-05-03 14:48:49 +09:00
gdb.py [FL-3174] Dolphin builder in ufbt; minor ufbt/fbt improvements (#2601) 2023-05-03 14:48:49 +09:00
jflash.py [FL-2832] fbt: more fixes & improvements (#1854) 2022-10-13 01:12:05 +09:00
objdump.py [FL-3174] Dolphin builder in ufbt; minor ufbt/fbt improvements (#2601) 2023-05-03 14:48:49 +09:00
openocd.py [FL-3174] Dolphin builder in ufbt; minor ufbt/fbt improvements (#2601) 2023-05-03 14:48:49 +09:00
pvsstudio.py [FL-3174] Dolphin builder in ufbt; minor ufbt/fbt improvements (#2601) 2023-05-03 14:48:49 +09:00
python3.py [FL-2832] fbt: more fixes & improvements (#1854) 2022-10-13 01:12:05 +09:00
sconsmodular.py [FL-3174] Dolphin builder in ufbt; minor ufbt/fbt improvements (#2601) 2023-05-03 14:48:49 +09:00
sconsrecursiveglob.py [FL-3174] Dolphin builder in ufbt; minor ufbt/fbt improvements (#2601) 2023-05-03 14:48:49 +09:00
strip.py [FL-3174] Dolphin builder in ufbt; minor ufbt/fbt improvements (#2601) 2023-05-03 14:48:49 +09:00