summaryrefslogtreecommitdiff
path: root/lib/ktl/include/__configuration/platform.h
blob: b15e1e07f73037817603dec706ccdec44077d6aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright 2025 The Fuchsia Authors
//
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT

#ifndef ZIRCON_KERNEL_LIB_KTL_INCLUDE___CONFIGURATION_PLATFORM_H_
#define ZIRCON_KERNEL_LIB_KTL_INCLUDE___CONFIGURATION_PLATFORM_H_

// Other libc++ headers use <__configuration/platform.h> but libc++'s
// <__configuration/platform.h> does not yet recognize the `__PE_COFF__`
// predefine. Until we support this new predefine upstream,
// we must define _LIBCPP_OBJECT_FORMAT_COFF for UEFI targets here.
// TODO(https://fxbug.dev/435771251) -- Support `__PE_COFF__` predefine
// upstream.

#if defined(__PE_COFF__)
#define _LIBCPP_OBJECT_FORMAT_COFF 2  // Tell libc++ this is PE-COFF.
#endif // __PE_COFF__

#include_next <__configuration/platform.h>

#endif  // ZIRCON_KERNEL_LIB_KTL_INCLUDE___CONFIGURATION_PLATFORM_H_