-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[flang] Modify lto testcase for AIX #74496
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
Conversation
@llvm/pr-subscribers-flang-driver Author: None (madanial0) ChangesChange the lto-flags test case to check for Full diff: https://github.com/llvm/llvm-project/pull/74496.diff 1 Files Affected:
diff --git a/flang/test/Driver/lto-flags.f90 b/flang/test/Driver/lto-flags.f90
index 2b3b08fbcc711..d0eeca2cdc711 100644
--- a/flang/test/Driver/lto-flags.f90
+++ b/flang/test/Driver/lto-flags.f90
@@ -11,7 +11,7 @@
! Also check linker plugin opt for Thin LTO
! RUN: %flang -### -flto=thin %s 2>&1 | FileCheck %s \
-! RUN: --check-prefixes=%if system-darwin %{THIN-LTO-ALL%} \
+! RUN: --check-prefixes=%if system-darwin %{THIN-LTO-ALL%}%if system-aix %{THIN-LTO-ALL,THIN-LTO-LINKER-PLUGIN-AIX%} \
! RUN: %else %{THIN-LTO-ALL,THIN-LTO-LINKER-PLUGIN%}
! RUN: not %flang -### -S -flto=somelto %s 2>&1 | FileCheck %s --check-prefix=ERROR
@@ -31,5 +31,6 @@
! THIN-LTO-ALL: "-fc1"
! THIN-LTO-ALL-SAME: "-flto=thin"
! THIN-LTO-LINKER-PLUGIN: "-plugin-opt=thinlto"
+! THIN-LTO-LINKER-PLUGIN-AIX: "-bdbg:thinlto"
! ERROR: error: unsupported argument 'somelto' to option '-flto=
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This patch breaks the lto-flags
test on Darwin. Please check the suggested change.
Also note that I have tested the change on Darwin only.
flang/test/Driver/lto-flags.f90
Outdated
! RUN: --check-prefixes=%if system-darwin %{THIN-LTO-ALL%}%if system-aix %{THIN-LTO-ALL,THIN-LTO-LINKER-PLUGIN-AIX%} \ | ||
! RUN: %else %{THIN-LTO-ALL,THIN-LTO-LINKER-PLUGIN%} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
! RUN: --check-prefixes=%if system-darwin %{THIN-LTO-ALL%}%if system-aix %{THIN-LTO-ALL,THIN-LTO-LINKER-PLUGIN-AIX%} \ | |
! RUN: %else %{THIN-LTO-ALL,THIN-LTO-LINKER-PLUGIN%} | |
! RUN: --check-prefixes=THIN-LTO-ALL%if system-aix %{,THIN-LTO-LINKER-PLUGIN-AIX%} \ | |
! RUN: %else %{ %if !system-darwin %{,THIN-LTO-LINKER-PLUGIN%} %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not write separate RUN lines for different triples with different prefixes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, it would be better. It would avoid the nested %if
s and make it possible to test all targets on the same machine.
But wouldn't it require all tested targets to be built in clang/flang, and tested with a REQUIRES:
line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that avoiding the nested %if
is better, I added a new RUN line for powerpc aix to check -bdbg:thinlto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems -###
doesn't require the tested targets to be built in llvm, because no code is generated, so this is fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and works correctly on Darwin now. Please wait for @banach-space.
Thanks for the review! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Change the lto-flags test case to check for
-bdbg:thinlto
on AIX