Open ingomueller-net opened 2 years ago
What happens when you execute that same command in the terminal?
/usr/bin/cmake --build /XXX/build --config Debug --target IteratorsUnitTests -j 98 --
It compiles as intended (and my wrapper script traces the execution as expected).
Where are you getting LLVM from? I don't see IteratorsUnitTests
in LLVM-project. I'd like to make sure I'm using the same project as you so we can try to reproduce this.
That target is from a small project I started working on. I am still in the middle of integrating it into the CMake infrastructure. However, any target from that repo is affected, i.e., if I build all
, or any other target, I run into the same problem.
I'm not super familiar with how external projects hook into LLVM. Do I just need to add the two args mentioned in the error text to my configuration (starting at the root of llvm-project)?
Do any of the targets in llvm-project build correctly for you?
EDIT: I see I missed the build instructions a few folders up. Do you build with or without IREE?
I have checked out llvm-project
in a separate directory and then run the configure.py
script, which sets up CMake to combine the two repos as described in the [README]. I don't understand the exact mechanisms of how this "combining" works, though.
Is there a special way to configure python to make this work that's not documented in the readme? I cloned your project and llvm-project, ran the python commands in the readme to set up the venv, then ran configure, and it seems that my verison of argparse is incompatible?
Any hints as to how to configure this?
What Python version are you using? BooleanOptionalAction
seems to have been introduced in Python 3.9 (see here), so if that attribute is not found, chances are that you are using an older version. If you don't want to upgrade, you can probably just delete the corresponding line (or replace with action="store_true",
).
I just found out that my problem disappears if I remove the line "cmake.buildTask": true
from settings.json
. I also found that somebody else reported a similar behavior here. To be honest, I don't know how that line ended up in my config.
Looking at the translation of some UI strings (where does that UI show up?), I am guessing that that option disables the use of the CMake build process. So, if not running cmake is intentional, the output should also not say that it will run it...
I was on vacation last week and am slowly catching back up. I had whatever version of python matches the Ubuntu 20.04 LTS. I didn't attempt to upgrade it. Good to know for future issues.
cmake.buildTask
will tell VS Code to run your default build task (which runs in the Terminal panel) instead of having us spawn the process and pipe the output into the Output panel. If you do not have a default build task configured, that would explain why nothing happened. I think we should do some investigation into whether we can detect that there is no default build task and provide a warning of some kind for this case. Thank you for following up.
What is also really weird is that the following line shows up in the log even though that command isn't actually run:
[proc] Executing command: /usr/bin/cmake --build /XXX/build --config Debug --target IteratorsUnitTests -j 98 --
Brief Issue Summary
I have just set up VSCode and CMake tools for a relatively complex project (LLVM). When I run "CMake: Build Target" (for any target), I get the following output but nothing is actually built:
To find out what is happening, I have replaced
/usr/bin/cmake
with a script that records each invocation including its command line parameters to a new file and then calls the original CMake binary with the same parameters:In that complex project, the only calls to cmake have the parameters
-- --version
-- no actual build is run (which confirms what I observe in the output window). If I run the command that is said is run manually, it build the project as expected. Also, if I use VSCode+CMake tools with a smaller project, everything works fine, including the tracing to my wrapper script (i.e., I observe calls to CMake that invoke the build target).I do not know how to debug this further.
CMake Tools Diagnostics
Debug Log
Also with CMake tracing, we see that the command should be called but isn't. (Note that I shortened the output after
Found index files
.)