Skip to content

Commit 8994077

Browse files
committed
fixup! [Flang][Driver] Predefine pic/pie macros based on configured level
1 parent 50ebbb0 commit 8994077

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

flang/lib/Frontend/CompilerInvocation.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,11 +1698,15 @@ void CompilerInvocation::setDefaultPredefinitions() {
16981698

16991699
// Add predefinitions based on the relocation model
17001700
if (unsigned PICLevel = getCodeGenOpts().PICLevel) {
1701-
fortranOptions.predefinitions.emplace_back("__PIC__", std::to_string(PICLevel));
1702-
fortranOptions.predefinitions.emplace_back("__pic__", std::to_string(PICLevel));
1701+
fortranOptions.predefinitions.emplace_back("__PIC__",
1702+
std::to_string(PICLevel));
1703+
fortranOptions.predefinitions.emplace_back("__pic__",
1704+
std::to_string(PICLevel));
17031705
if (getCodeGenOpts().IsPIE) {
1704-
fortranOptions.predefinitions.emplace_back("__PIE__", std::to_string(PICLevel));
1705-
fortranOptions.predefinitions.emplace_back("__pie__", std::to_string(PICLevel));
1706+
fortranOptions.predefinitions.emplace_back("__PIE__",
1707+
std::to_string(PICLevel));
1708+
fortranOptions.predefinitions.emplace_back("__pie__",
1709+
std::to_string(PICLevel));
17061710
}
17071711
}
17081712

0 commit comments

Comments
 (0)