Skip to content

Conversation

@kper
Copy link
Contributor

@kper kper commented Jan 28, 2025

As discussed with @DavidSpickett in discord. Running the test runner caused the following issue:

gmake: Entering directory '/home/kper/oss/llvm-project/build/lldb-test-build.noindex/functionalities/thread/concurrent_events/TestConcurrentSignalWatch.test'
/home/kper/oss/llvm-project/build/bin/clang++  -std=c++11 -g -O0  -mriscv -I/home/kper/oss/llvm-project/lldb/packages/Python/lldbsuite/test/make/../../../../..//include -I/home/kper/oss/llvm-project/build/tools/lldb/include -I/home/kper/oss/llvm-project/lldb/test/API/functionalities/thread/concurrent_events -I/home/kper/oss/llvm-project/lldb/packages/Python/lldbsuite/test/make -include /home/kper/oss/llvm-project/lldb/packages/Python/lldbsuite/test/make/test_common.h -fno-limit-debug-info      --driver-mode=g++ -MT main.o -MD -MP -MF main.d -c -o main.o /home/kper/oss/llvm-project/lldb/test/API/functionalities/thread/concurrent_events/main.cpp
clang++: error: unknown argument: '-mriscv'
gmake: *** [Makefile.rules:619: main.o] Error 1

By overriding the flags, we avoid the -mriscv.

@kper kper requested a review from JDevlieghere as a code owner January 28, 2025 14:47
@llvmbot llvmbot added the lldb label Jan 28, 2025
@llvmbot
Copy link
Member

llvmbot commented Jan 28, 2025

@llvm/pr-subscribers-lldb

Author: None (kper)

Changes

As discussed with @DavidSpickett in discord. Running the test runner caused the following issue:

gmake: Entering directory '/home/kper/oss/llvm-project/build/lldb-test-build.noindex/functionalities/thread/concurrent_events/TestConcurrentSignalWatch.test'
/home/kper/oss/llvm-project/build/bin/clang++  -std=c++11 -g -O0  -mriscv -I/home/kper/oss/llvm-project/lldb/packages/Python/lldbsuite/test/make/../../../../..//include -I/home/kper/oss/llvm-project/build/tools/lldb/include -I/home/kper/oss/llvm-project/lldb/test/API/functionalities/thread/concurrent_events -I/home/kper/oss/llvm-project/lldb/packages/Python/lldbsuite/test/make -include /home/kper/oss/llvm-project/lldb/packages/Python/lldbsuite/test/make/test_common.h -fno-limit-debug-info      --driver-mode=g++ -MT main.o -MD -MP -MF main.d -c -o main.o /home/kper/oss/llvm-project/lldb/test/API/functionalities/thread/concurrent_events/main.cpp
clang++: error: unknown argument: '-mriscv'
gmake: *** [Makefile.rules:619: main.o] Error 1

By overriding the flags, we avoid the -mriscv.


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

1 Files Affected:

  • (modified) lldb/packages/Python/lldbsuite/test/make/Makefile.rules (+4)
diff --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
index 2da6ff226b615c..06959f226066ac 100644
--- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
+++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules
@@ -207,6 +207,10 @@ else
 		override ARCH :=
 		override ARCHFLAG :=
 	endif
+	ifeq "$(ARCH)" "riscv"
+		override ARCH :=
+		override ARCHFLAG :=
+	endif
 	ifeq "$(findstring mips,$(ARCH))" "mips"
 		override ARCHFLAG := -
 	endif

Copy link
Collaborator

@DavidSpickett DavidSpickett left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

My understanding of this is it generates -m64 and -m32 flags for architectures that need it, and RISC-V is not one of those.

(I have heard of toolchains with both 32 and 64 bit but they use a different triple for each iirc)

@JDevlieghere
Copy link
Member

@kper Please let us know if you need one of us to press the merge button for you.

@kper
Copy link
Contributor Author

kper commented Jan 31, 2025

Only those with write access to this repository can merge pull requests.

@JDevlieghere Thank you, I think that one of you needs to merge it. Next to this message is also a "Update branch" button but I am not sure whether I will lose the approval if I rebase.

@DavidSpickett
Copy link
Collaborator

I am not sure whether I will lose the approval if I rebase.

GitHub seems to let you do almost anything without losing existing approvals, for better or worse :)

It would have been fine anyway, it's just doing the rebase onto main that "squash and merge" will do anyway.

@DavidSpickett
Copy link
Collaborator

Please set a valid email address first - https://llvm.org/docs/DeveloperPolicy.html#github-email-address

Then this can be merged.

@DavidSpickett DavidSpickett merged commit 614f1ab into llvm:main Jan 31, 2025
5 of 7 checks passed
@kper kper deleted the bugfix/change-makefile-lldb-riscv branch January 31, 2025 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants