gecko-dev/toolkit/components/contentanalysis/moz.build
Greg Stoll bb30992666 Bug 1959115 - monitor pastes into GenAI custom prompt for Content Analysis r=dlp-reviewers,firefox-ai-ml-reviewers,handyman,Mardak
We handle this similarly to pasting into a prompt() dialog, so I
refactored that logic into a new ContentAnalysisUtils and call it from
both places.

Also drive-by cleanup of BUG_COMPONENT for a few Content Analysis
moz.build's

Differential Revision: https://phabricator.services.mozilla.com/D244818
2025-04-10 20:48:22 +00:00

66 lines
1.7 KiB
Python

# -*- 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/.
with Files("**"):
BUG_COMPONENT = ("Firefox", "Data Loss Prevention")
UNIFIED_SOURCES += [
"content_analysis/sdk/analysis.pb.cc",
"ContentAnalysis.cpp",
]
EXTRA_JS_MODULES += [
"ContentAnalysisUtils.sys.mjs",
]
UNIFIED_SOURCES += [
"../../../third_party/content_analysis_sdk/browser/src/client_base.cc",
]
EXPORTS += ["ContentAnalysis.h"]
EXPORTS.mozilla.contentanalysis += [
"ContentAnalysisIPCTypes.h",
]
if CONFIG["OS_ARCH"] == "WINNT":
UNIFIED_SOURCES += [
"../../../third_party/content_analysis_sdk/browser/src/client_win.cc",
"../../../third_party/content_analysis_sdk/common/utils_win.cc",
]
elif CONFIG["OS_ARCH"] == "Darwin":
UNIFIED_SOURCES += [
"../../../third_party/content_analysis_sdk/browser/src/client_mac.cc",
]
else:
UNIFIED_SOURCES += [
"../../../third_party/content_analysis_sdk/browser/src/client_posix.cc",
]
LOCAL_INCLUDES += [
"../../../third_party/content_analysis_sdk",
"../../../third_party/content_analysis_sdk/browser/include",
"content_analysis/sdk/",
]
XPIDL_SOURCES += [
"nsIContentAnalysis.idl",
]
XPIDL_MODULE = "toolkit_contentanalysis"
XPCOM_MANIFESTS += [
"components.conf",
]
include("/ipc/chromium/chromium-config.mozbuild")
DEFINES["GOOGLE_PROTOBUF_NO_RTTI"] = True
DEFINES["GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER"] = True
FINAL_LIBRARY = "xul"
TEST_DIRS += ["tests"]