1# Copyright (c) 2019 Intel Corp.
2# SPDX-License-Identifier: Apache-2.0
3
4zephyr_cc_option(-m64)
5
6set_property(GLOBAL PROPERTY PROPERTY_OUTPUT_ARCH "i386:x86-64")
7set_property(GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT "elf64-x86-64")
8get_property(OUTPUT_ARCH   GLOBAL PROPERTY PROPERTY_OUTPUT_ARCH)
9get_property(OUTPUT_FORMAT GLOBAL PROPERTY PROPERTY_OUTPUT_FORMAT)
10
11if(CONFIG_X86_SSE)
12  # x86-64 by default has SSE and SSE2
13  # so no need to add compiler flags for them.
14
15  if(CONFIG_X86_SSE3)
16    zephyr_cc_option(-msse3)
17  else()
18    zephyr_cc_option(-mno-sse3)
19  endif()
20
21  if(CONFIG_X86_SSSE3)
22    zephyr_cc_option(-mssse3)
23  else()
24    zephyr_cc_option(-mno-ssse3)
25  endif()
26
27  if(CONFIG_X86_SSE41)
28    zephyr_cc_option(-msse4.1)
29  else()
30    zephyr_cc_option(-mno-sse4.1)
31  endif()
32
33  if(CONFIG_X86_SSE42)
34    zephyr_cc_option(-msse4.2)
35  else()
36    zephyr_cc_option(-mno-sse4.2)
37  endif()
38
39  if(CONFIG_X86_SSE4A)
40    zephyr_cc_option(-msse4a)
41  else()
42    zephyr_cc_option(-mno-sse4a)
43  endif()
44
45endif()
46
47add_subdirectory(core)
48