[llvm] Windows: use EcoQoS for ThreadPriority::Background (PR #148797)

Sharjeel Khan via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 29 23:02:36 PDT 2025


Sharjeel-Khan wrote:

On Android buildbots, it seems this PR started causing failures:
```
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/Threading.cpp.obj 
/b/f/w/src/git/out/stage2-install/bin/clang++ --sysroot=/b/f/w/src/git/out/sysroots/x86_64-w64-mingw32 -DEXPERIMENTAL_KEY_INSTRUCTIONS -DGTEST_HAS_RTTI=0 -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__SHORT_FILE__=\"Threading.cpp\" -I/b/f/w/src/git/out/lib/libsimpleperf_readelf-windows/lib/Support -I/b/f/w/src/git/out/llvm-project/llvm/lib/Support -I/b/f/w/src/git/out/lib/libsimpleperf_readelf-windows/include -I/b/f/w/src/git/out/llvm-project/llvm/include -I/b/f/w/src/git/out/llvm-project/llvm/../third-party/siphash/include -ffile-prefix-map=/b/f/w/src/git/= -B/b/f/w/src/git/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32/bin --target=x86_64-pc-windows-gnu -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_WIN32_WINNT=0x0600 -DWINVER=0x0600 -D__MSVCRT_VERSION__=0x1400 -D_LIBCPP_AVAILABILITY_HAS_NO_VERBOSE_ABORT=1 -Wno-unused-command-line-argument --sysroot=/b/f/w/src/git/out/sysroots/x86_64-w64-mingw32 -stdlib=libc++ -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -ffunction-sections -fdata-sections  -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/Threading.cpp.obj -MF lib/Support/CMakeFiles/LLVMSupport.dir/Threading.cpp.obj.d -o lib/Support/CMakeFiles/LLVMSupport.dir/Threading.cpp.obj -c /b/f/w/src/git/out/llvm-project/llvm/lib/Support/Threading.cpp
In file included from /[b/f/w/src/git/out/llvm-project/llvm/lib/Support/Threading.cpp:70](https://cs.corp.google.com/piper///depot/google3/b/f/w/src/git/out/llvm-project/llvm/lib/Support/Threading.cpp?l=70):
/[b/f/w/src/git/out/llvm-project/llvm/lib/Support/Windows/Threading.inc:152](https://cs.corp.google.com/piper///depot/google3/b/f/w/src/git/out/llvm-project/llvm/lib/Support/Windows/Threading.inc?l=152):9: error: unknown type name 'THREAD_POWER_THROTTLING_STATE'
  152 |         THREAD_POWER_THROTTLING_STATE state{};
      |         ^
/[b/f/w/src/git/out/llvm-project/llvm/lib/Support/Windows/Threading.inc:153](https://cs.corp.google.com/piper///depot/google3/b/f/w/src/git/out/llvm-project/llvm/lib/Support/Windows/Threading.inc?l=153):25: error: use of undeclared identifier 'THREAD_POWER_THROTTLING_CURRENT_VERSION'
  153 |         state.Version = THREAD_POWER_THROTTLING_CURRENT_VERSION;
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/[b/f/w/src/git/out/llvm-project/llvm/lib/Support/Windows/Threading.inc:157](https://cs.corp.google.com/piper///depot/google3/b/f/w/src/git/out/llvm-project/llvm/lib/Support/Windows/Threading.inc?l=157):35: error: use of undeclared identifier 'ThreadPowerThrottling'
  157 |             ::GetCurrentThread(), ThreadPowerThrottling, &state, sizeof(state));
      |                                   ^~~~~~~~~~~~~~~~~~~~~
/[b/f/w/src/git/out/llvm-project/llvm/lib/Support/Windows/Threading.inc:165](https://cs.corp.google.com/piper///depot/google3/b/f/w/src/git/out/llvm-project/llvm/lib/Support/Windows/Threading.inc?l=165):34: error: use of undeclared identifier 'THREAD_POWER_THROTTLING_EXECUTION_SPEED'
  165 |                                ? THREAD_POWER_THROTTLING_EXECUTION_SPEED
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 errors generated.
```

Where are these things types and identifiers supposed to be pulled from?



https://github.com/llvm/llvm-project/pull/148797


More information about the llvm-commits mailing list