-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
[clang] Introduce a new UEFI target predefine. #111719
Conversation
Remove PE_COFF
Updating the PE COFF generating windows code path to predefine the new __UEFI__ macro.
Didn't know this existed, but we have #120632 tracking it now. |
@llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Prabhuk (Prabhuk) ChangesAdd a Full diff: https://github.com/llvm/llvm-project/pull/111719.diff 1 Files Affected:
diff --git a/clang/lib/Basic/Targets/OSTargets.h b/clang/lib/Basic/Targets/OSTargets.h
index a83d6464e789d6..5a23eef0117294 100644
--- a/clang/lib/Basic/Targets/OSTargets.h
+++ b/clang/lib/Basic/Targets/OSTargets.h
@@ -783,7 +783,9 @@ template <typename Target>
class LLVM_LIBRARY_VISIBILITY UEFITargetInfo : public OSTargetInfo<Target> {
protected:
void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
- MacroBuilder &Builder) const override {}
+ MacroBuilder &Builder) const override {
+ Builder.defineMacro("__UEFI__");
+ }
public:
UEFITargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
|
Can you include a test for this change? |
I'll add the test. |
Thanks. I left another comment there for @RossComputerGuy to decide on whether to land this patch or not. |
Add a
__UEFI__
predefine for UEFI target.Co-authored-by: RossComputerGuy