Skip to content

Commit f7fdc8d

Browse files
committed
[llvm][Support] Disable runOnNewStack test when threading is disabled
On our buildbot https://lab.llvm.org/buildbot/#/builders/122/builds/1478, one of the new tests added by llvm#136046 failed. This is because on non-Apple Silicon platforms, the implementation is to start a new thread, but when threading is disabled this is the same as calling a function normally.
1 parent 461255e commit f7fdc8d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

llvm/unittests/Support/ProgramStackTest.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212

1313
using namespace llvm;
1414

15+
// One way of running on a new stack is to start a new thread. When threading
16+
// is disabled a "new thread" is implemented as simply calling the function.
17+
#if LLVM_ENABLE_THREADS
18+
1519
static uintptr_t func(int &A) {
1620
A = 7;
1721
return getStackPointer();
@@ -33,3 +37,5 @@ TEST(ProgramStackTest, runOnNewStack) {
3337
runOnNewStack(0, function_ref<void(int &)>(func2), A);
3438
EXPECT_EQ(A, 5);
3539
}
40+
41+
#endif /*if LLVM_ENABLE_THREADS */

0 commit comments

Comments
 (0)