File tree Expand file tree Collapse file tree 1 file changed +32
-2
lines changed Expand file tree Collapse file tree 1 file changed +32
-2
lines changed Original file line number Diff line number Diff line change 3
3
# Not all plugins are supported on Windows yet. This file tweaks
4
4
# the build flags so that we can compile fluent-bit on it.
5
5
6
+ set (FLB_ARCH "" )
7
+
8
+ if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(ARM64|AARCH64|arm64)$" )
9
+ set (FLB_ARCH "arm64" )
10
+
11
+ elseif (CMAKE_SIZEOF_VOID_P EQUAL 8 )
12
+ set (FLB_ARCH "x64" )
13
+ elseif (CMAKE_SIZEOF_VOID_P EQUAL 4 )
14
+ set (FLB_ARCH "x86" )
15
+ endif ()
16
+
17
+ if (NOT FLB_ARCH )
18
+ message (WARNING "Unknown architecture; falling back to x64 heuristics" )
19
+ set (FLB_ARCH "x64" )
20
+ endif ()
21
+
22
+ message (STATUS "Detected target architecture: ${FLB_ARCH} " )
23
+
6
24
if (FLB_WINDOWS_DEFAULTS )
7
25
message (STATUS "Overriding setttings with windows-setup.cmake" )
8
26
set (FLB_REGEX Yes )
@@ -17,7 +35,13 @@ if(FLB_WINDOWS_DEFAULTS)
17
35
if (NOT FLB_LIBYAML_DIR )
18
36
set (FLB_CONFIG_YAML No )
19
37
endif ()
20
- set (FLB_WASM No )
38
+ if (FLB_ARCH STREQUAL "arm64" )
39
+ set (FLB_WASM No )
40
+ elseif (FLB_ARCH STREQUAL "x64" )
41
+ set (FLB_WASM Yes )
42
+ elseif (FLB_ARCH STREQUAL "x86" )
43
+ set (FLB_WASM Yes )
44
+ endif ()
21
45
set (FLB_WAMRC No )
22
46
23
47
# INPUT plugins
@@ -107,7 +131,13 @@ if(FLB_WINDOWS_DEFAULTS)
107
131
set (FLB_FILTER_GEOIP2 Yes )
108
132
set (FLB_FILTER_AWS Yes )
109
133
set (FLB_FILTER_ECS Yes )
110
- set (FLB_FILTER_WASM No )
134
+ if (FLB_ARCH STREQUAL "arm64" )
135
+ set (FLB_FILTER_WASM No )
136
+ elseif (FLB_ARCH STREQUAL "x64" )
137
+ set (FLB_FILTER_WASM Yes )
138
+ elseif (FLB_ARCH STREQUAL "x86" )
139
+ set (FLB_FILTER_WASM Yes )
140
+ endif ()
111
141
endif ()
112
142
113
143
# Search bison and flex executables
You can’t perform that action at this time.
0 commit comments