commit 3d9f0856b5387891a144d911094f6f468038e5c1
parent 84128fbb5641caea8c894ab07427771df6c17ed6
Author: André Bargull <andre.bargull@gmail.com>
Date: Mon, 22 Dec 2025 15:18:02 +0000
Bug 1504045 - Part 8: Add moz.build for js/src/vtune. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D276621
Diffstat:
2 files changed, 32 insertions(+), 16 deletions(-)
diff --git a/js/src/moz.build b/js/src/moz.build
@@ -300,22 +300,6 @@ if CONFIG["MOZ_INSTRUMENTS"]:
"devtools/Instruments.cpp",
]
-if CONFIG["MOZ_VTUNE"]:
- SOURCES += [
- "vtune/ittnotify_static.c",
- "vtune/jitprofiling.c",
- "vtune/VTuneWrapper.cpp",
- ]
- SOURCES["vtune/ittnotify_static.c"].flags += [
- "-Wno-varargs",
- "-Wno-sign-compare",
- "-Wno-unknown-pragmas",
- ]
- if CONFIG["CC_TYPE"] == "gcc":
- SOURCES["vtune/ittnotify_static.c"].flags += ["-Wno-stringop-overflow"]
- if int(CONFIG["CC_VERSION"].split(".")[0]) >= 8:
- SOURCES["vtune/ittnotify_static.c"].flags += ["-Wno-stringop-truncation"]
-
DIRS += [
"build",
"builtin",
@@ -336,6 +320,9 @@ DIRS += [
if CONFIG["JS_HAS_CTYPES"]:
DIRS += ["ctypes"]
+if CONFIG["MOZ_VTUNE"]:
+ DIRS += ["vtune"]
+
if CONFIG["JS_HAS_INTL_API"]:
DIRS += ["builtin/intl", "builtin/temporal"]
diff --git a/js/src/vtune/moz.build b/js/src/vtune/moz.build
@@ -0,0 +1,29 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+FINAL_LIBRARY = "js"
+
+# Includes should be relative to parent path
+LOCAL_INCLUDES += ["!..", ".."]
+
+include("../js-compileflags.mozbuild")
+include("../js-config.mozbuild")
+include("../js-cxxflags.mozbuild")
+
+SOURCES += [
+ "ittnotify_static.c",
+ "jitprofiling.c",
+ "VTuneWrapper.cpp",
+]
+SOURCES["ittnotify_static.c"].flags += [
+ "-Wno-varargs",
+ "-Wno-sign-compare",
+ "-Wno-unknown-pragmas",
+]
+if CONFIG["CC_TYPE"] == "gcc":
+ SOURCES["ittnotify_static.c"].flags += ["-Wno-stringop-overflow"]
+ if int(CONFIG["CC_VERSION"].split(".")[0]) >= 8:
+ SOURCES["ittnotify_static.c"].flags += ["-Wno-stringop-truncation"]