Skip to content

Commit 8fb067c

Browse files
committed
Make detection of --gsframe more portable
Per review comments by Gemini Code Assist, the previous code for the sframe option was specific to GCC and failed for Clang. This updates it to work for both.
1 parent b53551a commit 8fb067c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ HIPCCFLAGS := $(BASE_HIPCCFLAGS) $(HIPCCFLAGS)
5151
# instructions, it uses additional registers, and that causes the assembler to
5252
# produce (many) warnings. They are harmless for qsim because it does not rely
5353
# on SFrame. Silence those warnings if the assembler supports it.
54-
SUPPORTS_GSFRAME := $(shell as --help 2>&1 | grep -isq "\-\-gsframe" && echo "true")
54+
SUPPORTS_GSFRAME := $(shell $(CXX) -Wa,--gsframe=no -c -x c++ /dev/null -o /dev/null 2>/dev/null && echo "true")
5555
ifeq ($(SUPPORTS_GSFRAME),true)
5656
CXXFLAGS += -Wa,--gsframe=no
5757
endif

0 commit comments

Comments
 (0)