v8 147.4.0

Rust bindings to V8
Documentation
# 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",
  ]

  # TODO(crbug.com/483020951): Replace this with `-Wno-array-bounds-member` if
  # that gets implemented. Then patch simdutf and remove this completely.
  # Upstream issue: https://github.com/simdutf/simdutf/issues/938
  cflags = [ "-Wno-array-bounds" ]

  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" ]
  }
}