-
Notifications
You must be signed in to change notification settings - Fork 19
Flang: __ARM_ARCH and friends defined for AArch64 #30
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
|
@vjayathirtha-nv, please review. Thanks! |
| UpperCmdArgs.push_back("-def"); UpperCmdArgs.push_back("__LONG_MAX__=9223372036854775807L"); | ||
| UpperCmdArgs.push_back("-def"); UpperCmdArgs.push_back("__SIZE_TYPE__=unsigned long int"); | ||
| UpperCmdArgs.push_back("-def"); UpperCmdArgs.push_back("__PTRDIFF_TYPE__=long int"); | ||
| switch (getToolChain().getEffectiveTriple().getArch()) { |
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.
The lines common to all the cases can be factored out.
test/Driver/arch-specific-macros.f
Outdated
| @@ -0,0 +1,15 @@ | |||
| ! RUN: %flang -target aarch64 -v -x f77 -### -c - 2>&1 >/dev/null | FileCheck --check-prefix=AARCH64 %s | |||
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.
-v not needed
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 test file is useless anyway. It uses %flang as it assumes that pull request flang-compiler/clang#20 was pulled into frontend driver. Now as flang moved to release_60 and affected configuration file lit.cfg migrated to lit.cfg.py (with significant rewrite and different ideas about tool discovery), referenced pull request won't apply any longer.
test/Driver/arch-specific-macros.f
Outdated
| ! AARCH64: __aarch64__ | ||
| ! AARCH64: __ARM_ARCH=8 | ||
| ! AARCH64: __ARM_ARCH__=8 | ||
| ! AARCH64-NOT: __x86_64__ |
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.
Flang can be built on OpenPower too.
AARCH64-NOT should not imply __X86_64__.
Vice-versa for X86_64-NOT
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.
That's not what this test case tests. This test case tests only what this patch introduces: awareness of x86_64 and aarch64. Iff soneone adds OpenPOWER, this test will have to be amended.
…s defined for x86_64 only Signed-off-by: Paul Osmialowski <[email protected]>
|
Simplified version uploaded. |
|
LGTM. |
|
@gklimowicz You'll want to update the driver to support OpenPower. |
No description provided.