| # Copyright 2024 The Chromium Authors |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/config/avx512.gni") |
| |
| source_set("header") { |
| sources = [ "simdutf.h" ] |
| } |
| |
| source_set("simdutf") { |
| sources = [ "simdutf.cpp" ] |
| public_deps = [ ":header" ] |
| cflags_cc = [ |
| "-Wno-unused-const-variable", |
| "-Wno-unused-function", |
| ] |
| defines = [] |
| if (!allow_avx512) { |
| defines += [ "SIMDUTF_IMPLEMENTATION_ICELAKE=0" ] |
| } |
| if (is_win) { |
| # Supress dllexports when included in chrome.exe. |
| defines += [ "SIMDUTF_DLLIMPORTEXPORT=" ] |
| } |
| configs -= [ "//build/config/compiler:chromium_code" ] |
| configs += [ "//build/config/compiler:no_chromium_code" ] |
| if (!is_debug) { |
| configs -= [ "//build/config/compiler:default_optimization" ] |
| configs += [ "//build/config/compiler:optimize_speed" ] |
| } |
| } |