You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For instance, during Android Linux kernel development, the builds are usually done by a make bootimage is the global repo-workspace. (repo is an Android-specific tool for managing multiple git repositories) This builds the kernel with proper flags and configuration. This affects the paths. For instance:
repo workspace: /path/to/lineage-src
kernel repository and the VS Code workspace: /path/to/lineage-src/kernel/fxtec/msm8998
build artifacts: /path/to/lineage-src/out/target/product/pro1/obj/KERNEL_OBJ/usr/.initramfs_data.cpio.gz.cmd
However, the python script expects the cmd files to be present in the current working directory tree. One can change directory to point to some build artifact directory, but then the relative paths are incorrect. Trying to correct them manually causes some include path errors.
I ended up having errors like function type is not allowed for bool inside a definition of a struct, so something is completely wrong here
To reproduce, follow https://wiki.lineageos.org/devices/pro1/build, instead of the Start the build step, execute make bootimage in the root of the LineageOS tree. You can probably use some different device, the outcome should be the same.
Here's my compile commands, both vanilla and with paths adjusted.
For instance, during Android Linux kernel development, the builds are usually done by a
make bootimage
is the global repo-workspace. (repo is an Android-specific tool for managing multiple git repositories) This builds the kernel with proper flags and configuration. This affects the paths. For instance:repo workspace:
/path/to/lineage-src
kernel repository and the VS Code workspace:
/path/to/lineage-src/kernel/fxtec/msm8998
build artifacts:
/path/to/lineage-src/out/target/product/pro1/obj/KERNEL_OBJ/usr/.initramfs_data.cpio.gz.cmd
However, the python script expects the
cmd
files to be present in the current working directory tree. One can changedirectory
to point to some build artifact directory, but then the relative paths are incorrect. Trying to correct them manually causes some include path errors.Out of tree builds are nothing new for the Linux kernel and are not Android-specific: https://lwn.net/Articles/90818/
Note: I tried playing around with
includePath
but it after arriving at:I ended up having errors like function type is not allowed for
bool
inside a definition of astruct
, so something is completely wrong hereTo reproduce, follow https://wiki.lineageos.org/devices/pro1/build, instead of the Start the build step, execute
make bootimage
in the root of the LineageOS tree. You can probably use some different device, the outcome should be the same.Here's my compile commands, both vanilla and with paths adjusted.
compile_commands.json.zip
compile_commands_patched.json.zip
EDIT: the following contents of
c_cpp_properties.json
worked for me:The text was updated successfully, but these errors were encountered: