Skip to content

[CMake] Fix variable name #127967

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

petrhosek
Copy link
Member

This was accidentaly introduced in #126876.

This was accidentaly introduced in llvm#126876.
@petrhosek petrhosek added the cmake Build system in general and CMake in particular label Feb 20, 2025
@petrhosek petrhosek requested a review from tstellar February 20, 2025 07:41
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Feb 20, 2025
@llvmbot
Copy link
Member

llvmbot commented Feb 20, 2025

@llvm/pr-subscribers-clang

Author: Petr Hosek (petrhosek)

Changes

This was accidentaly introduced in #126876.


Full diff: https://github.com/llvm/llvm-project/pull/127967.diff

1 Files Affected:

  • (modified) clang/utils/perf-training/CMakeLists.txt (+1-1)
diff --git a/clang/utils/perf-training/CMakeLists.txt b/clang/utils/perf-training/CMakeLists.txt
index 0c1cdd9a1fb60..1d7bb788a15ed 100644
--- a/clang/utils/perf-training/CMakeLists.txt
+++ b/clang/utils/perf-training/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CLANG_PGO_TRAINING_DEPS "" CACHE STRING "Extra dependencies needed to build
 option(CLANG_PGO_TRAINING_USE_LLVM_BUILD "Use LLVM build for generating PGO data" ON)
 
 llvm_canonicalize_cmake_booleans(
-  CLANG_PGO_TRAINING_USE_LLVM
+  CLANG_PGO_TRAINING_USE_LLVM_BUILD
 )
 
 if(LLVM_BUILD_INSTRUMENTED)

@madhur13490
Copy link
Contributor

Please merge this soon. This has broken our CI miserably and has blocked all our testing. Thanks!

@madhur13490
Copy link
Contributor

The fix is NOT correct. You need to enclose in quotes as @tstellar mentions in #126876

Copy link
Collaborator

@tstellar tstellar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I confirmed this fixes the release build configuration.

@tstellar
Copy link
Collaborator

The fix is NOT correct. You need to enclose in quotes as @tstellar mentions in #126876

llvm_canonicalize_cmake_booleans converts the string to an integer so you don't need the quotes now that this function is called with the correct variable. This is what the generated file looks like now:

config.use_llvm_build = 1

@madhur13490
Copy link
Contributor

The fix is NOT correct. You need to enclose in quotes as @tstellar mentions in #126876

llvm_canonicalize_cmake_booleans converts the string to an integer so you don't need the quotes now that this function is called with the correct variable. This is what the generated file looks like now:

config.use_llvm_build = 1

Oh.. I see. Thanks!

@petrhosek petrhosek merged commit 81ed485 into llvm:main Feb 20, 2025
11 checks passed
@llvm-ci
Copy link
Collaborator

llvm-ci commented Feb 20, 2025

LLVM Buildbot has detected a new failure on builder lldb-arm-ubuntu running on linaro-lldb-arm-ubuntu while building clang at step 6 "test".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/18/builds/11773

Here is the relevant piece of the build log for the reference
Step 6 (test) failure: build (failure)
...
PASS: lldb-api :: tools/lldb-dap/instruction-breakpoint/TestDAP_instruction_breakpoint.py (1156 of 2908)
PASS: lldb-api :: tools/lldb-dap/locations/TestDAP_locations.py (1157 of 2908)
PASS: lldb-api :: tools/lldb-dap/memory/TestDAP_memory.py (1158 of 2908)
PASS: lldb-api :: tools/lldb-dap/module/TestDAP_module.py (1159 of 2908)
PASS: lldb-api :: tools/lldb-dap/evaluate/TestDAP_evaluate.py (1160 of 2908)
PASS: lldb-api :: tools/lldb-dap/optimized/TestDAP_optimized.py (1161 of 2908)
PASS: lldb-api :: tools/lldb-dap/output/TestDAP_output.py (1162 of 2908)
PASS: lldb-api :: tools/lldb-dap/repl-mode/TestDAP_repl_mode_detection.py (1163 of 2908)
UNSUPPORTED: lldb-api :: tools/lldb-dap/restart/TestDAP_restart_runInTerminal.py (1164 of 2908)
UNSUPPORTED: lldb-api :: tools/lldb-dap/runInTerminal/TestDAP_runInTerminal.py (1165 of 2908)
FAIL: lldb-api :: tools/lldb-dap/launch/TestDAP_launch.py (1166 of 2908)
******************** TEST 'lldb-api :: tools/lldb-dap/launch/TestDAP_launch.py' FAILED ********************
Script:
--
/usr/bin/python3.10 /home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env LLVM_LIBS_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./lib --env LLVM_INCLUDE_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/include --env LLVM_TOOLS_DIR=/home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin --arch armv8l --build-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex --lldb-module-cache-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/lldb --compiler /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/clang --dsymutil /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin/dsymutil --make /usr/bin/gmake --llvm-tools-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./bin --lldb-obj-root /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/tools/lldb --lldb-libs-dir /home/tcwg-buildbot/worker/lldb-arm-ubuntu/build/./lib /home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/test/API/tools/lldb-dap/launch -p TestDAP_launch.py
--
Exit Code: 1

Command Output (stdout):
--
lldb version 21.0.0git (https://github.com/llvm/llvm-project.git revision 81ed48531d51754fe4aac7a149ee4534a9ffda1b)
  clang revision 81ed48531d51754fe4aac7a149ee4534a9ffda1b
  llvm revision 81ed48531d51754fe4aac7a149ee4534a9ffda1b
Skipping the following test categories: ['libc++', 'dsym', 'gmodules', 'debugserver', 'objc']
========= DEBUG ADAPTER PROTOCOL LOGS =========
1740069970.014034510 --> 
Content-Length: 344

{
  "arguments": {
    "adapterID": "lldb-native",
    "clientID": "vscode",
    "columnsStartAt1": true,
    "linesStartAt1": true,
    "locale": "en-us",
    "pathFormat": "path",
    "sourceInitFile": false,
    "supportsRunInTerminalRequest": true,
    "supportsStartDebuggingRequest": true,
    "supportsVariablePaging": true,
    "supportsVariableType": true
  },
  "command": "initialize",
  "seq": 1,
  "type": "request"
}
1740069970.016421795 <-- 
Content-Length: 1631


@petrhosek petrhosek deleted the clang-pgo-training-use-llvm-build-fix branch February 24, 2025 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category cmake Build system in general and CMake in particular
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants