tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

moz.build (4039B)


      1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
      2 # vim: set filetype=python:
      3 # This Source Code Form is subject to the terms of the Mozilla Public
      4 # License, v. 2.0. If a copy of the MPL was not distributed with this
      5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
      6 
      7 # This is pretty much a copy from tools/profiler, cut down to exclude anything
      8 # that cannot work in mozglue (because they are totally dependent on libxul-
      9 # specific code).
     10 # All exported headers now prefixed with "Base" to avoid #include name clashes.
     11 
     12 if CONFIG["MOZ_GECKO_PROFILER"]:
     13     DEFINES["IMPL_MFBT"] = True
     14     EXPORTS += [
     15         "public/BaseProfilingStack.h",
     16     ]
     17     UNIFIED_SOURCES += [
     18         "core/PageInformation.cpp",
     19         "core/platform.cpp",
     20         "core/ProfileBuffer.cpp",
     21         "core/ProfileBufferEntry.cpp",
     22         "core/ProfiledThreadData.cpp",
     23         "core/ProfileJSONWriter.cpp",
     24         "core/ProfilerBacktrace.cpp",
     25         "core/ProfilerMarkers.cpp",
     26         "core/ProfilingCategory.cpp",
     27         "core/ProfilingStack.cpp",
     28         "core/RegisteredThread.cpp",
     29     ]
     30 
     31     if CONFIG["OS_TARGET"] in ("Android", "Linux", "FreeBSD"):
     32         # These files cannot be built in unified mode because of name clashes with mozglue headers on Android.
     33         SOURCES += [
     34             "core/shared-libraries-linux.cc",
     35         ]
     36         if CONFIG["TARGET_CPU"] == "arm" and CONFIG["OS_TARGET"] != "FreeBSD":
     37             SOURCES += [
     38                 "core/EHABIStackWalk.cpp",
     39             ]
     40     elif CONFIG["OS_TARGET"] == "Darwin":
     41         UNIFIED_SOURCES += [
     42             "core/shared-libraries-macos.cc",
     43         ]
     44     elif CONFIG["OS_TARGET"] == "WINNT":
     45         SOURCES += [
     46             "core/shared-libraries-win32.cc",
     47         ]
     48 
     49     LOCAL_INCLUDES += [
     50         "/mozglue/baseprofiler/core/",
     51         "/mozglue/linker",
     52     ]
     53 
     54     if CONFIG["OS_TARGET"] == "Android":
     55         DEFINES["ANDROID_NDK_MAJOR_VERSION"] = CONFIG["ANDROID_NDK_MAJOR_VERSION"]
     56         DEFINES["ANDROID_NDK_MINOR_VERSION"] = CONFIG["ANDROID_NDK_MINOR_VERSION"]
     57 
     58 GeneratedFile(
     59     "public/ProfilingCategoryList.h",
     60     script="build/generate_profiling_categories.py",
     61     entry_point="generate_macro_header",
     62     inputs=["build/profiling_categories.yaml"],
     63 )
     64 
     65 EXPORTS.mozilla += [
     66     "!public/ProfilingCategoryList.h",
     67     "public/BaseAndGeckoProfilerDetail.h",
     68     "public/BaseProfileJSONWriter.h",
     69     "public/BaseProfiler.h",
     70     "public/BaseProfilerCounts.h",
     71     "public/BaseProfilerDetail.h",
     72     "public/BaseProfilerLabels.h",
     73     "public/BaseProfilerMarkers.h",
     74     "public/BaseProfilerMarkersDetail.h",
     75     "public/BaseProfilerMarkersPrerequisites.h",
     76     "public/BaseProfilerMarkerTypes.h",
     77     "public/BaseProfilerRAIIMacro.h",
     78     "public/BaseProfilerState.h",
     79     "public/BaseProfilerUtils.h",
     80     "public/BaseProfilingCategory.h",
     81     "public/FailureLatch.h",
     82     "public/Flow.h",
     83     "public/leb128iterator.h",
     84     "public/ModuloBuffer.h",
     85     "public/PowerOfTwo.h",
     86     "public/ProfileBufferChunk.h",
     87     "public/ProfileBufferChunkManager.h",
     88     "public/ProfileBufferChunkManagerSingle.h",
     89     "public/ProfileBufferChunkManagerWithLocalLimit.h",
     90     "public/ProfileBufferControlledChunkManager.h",
     91     "public/ProfileBufferEntryKinds.h",
     92     "public/ProfileBufferEntrySerialization.h",
     93     "public/ProfileBufferIndex.h",
     94     "public/ProfileChunkedBuffer.h",
     95     "public/ProfileChunkedBufferDetail.h",
     96     "public/ProfilerBufferSize.h",
     97     "public/ProgressLogger.h",
     98     "public/ProportionValue.h",
     99     "public/SharedLibraries.h",
    100 ]
    101 
    102 UNIFIED_SOURCES += [
    103     "core/BaseAndGeckoProfilerDetail.cpp",
    104     "core/Flow.cpp",
    105     "core/ProfilerUtils.cpp",
    106 ]
    107 
    108 if CONFIG["MOZ_VTUNE"]:
    109     DEFINES["MOZ_VTUNE_INSTRUMENTATION"] = True
    110     UNIFIED_SOURCES += [
    111         "core/VTuneProfiler.cpp",
    112     ]
    113 
    114 FINAL_LIBRARY = "mozglue"
    115 
    116 if CONFIG["CC_TYPE"] in ("clang", "gcc"):
    117     CXXFLAGS += [
    118         "-Wno-ignored-qualifiers",  # due to use of breakpad headers
    119     ]
    120 
    121 with Files("**"):
    122     BUG_COMPONENT = ("Core", "Gecko Profiler")