mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
AK: Add Platform.h with an ARCH() macro.
You can currently use this to detect the CPU architecture like so: #if ARCH(I386) ... #elif ARCH(X86_64) ... #else ... #endif This will be helpful for separating out architecture-specific code blocks.
This commit is contained in:
parent
149fd7e045
commit
c452aa891f
Notes:
sideshowbarker
2024-07-19 13:21:25 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/c452aa891fd
2 changed files with 13 additions and 1 deletions
12
AK/Platform.h
Normal file
12
AK/Platform.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
#pragma once
|
||||
|
||||
#ifdef __i386__
|
||||
#define AK_ARCH_I386 1
|
||||
#endif
|
||||
|
||||
#ifdef __x86_64__
|
||||
#define AK_ARCH_X86_64 1
|
||||
#endif
|
||||
|
||||
#define ARCH(arch) (defined(AK_ARCH_##arch) && AK_ARCH_##arch)
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
ARCH_FLAGS =
|
||||
STANDARD_FLAGS = -std=c++17 -Wno-sized-deallocation -fno-sized-deallocation
|
||||
WARNING_FLAGS = -Werror -Wextra -Wall -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough
|
||||
WARNING_FLAGS = -Werror -Wextra -Wall -Wundef -Wcast-qual -Wwrite-strings -Wimplicit-fallthrough -Wno-expansion-to-defined
|
||||
FLAVOR_FLAGS = -fno-exceptions -fno-rtti
|
||||
OPTIMIZATION_FLAGS = -Os
|
||||
|
||||
|
|
Loading…
Reference in a new issue