Skip to content

Commit

Permalink
Add __amdflang__ define to identify compiler as AMD Flang
Browse files Browse the repository at this point in the history
  • Loading branch information
mjklemm committed Oct 2, 2024
1 parent 66ee96f commit cef5f02
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions flang/lib/Frontend/CompilerInvocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1456,6 +1456,7 @@ void CompilerInvocation::setDefaultPredefinitions() {
auto &fortranOptions = getFortranOpts();
const auto &frontendOptions = getFrontendOpts();
// Populate the macro list with version numbers and other predefinitions.
fortranOptions.predefinitions.emplace_back("__amdflang__", "1");
fortranOptions.predefinitions.emplace_back("__flang__", "1");
fortranOptions.predefinitions.emplace_back("__flang_major__",
FLANG_VERSION_MAJOR_STRING);
Expand Down

0 comments on commit cef5f02

Please sign in to comment.