<commit_before># Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

{
  'variables': {
    'verbose_libraries_build%': 0,
    'instrumented_libraries_jobs%': 1,
  },

  'conditions': [
    ['asan==1', {
      'sanitizer_type': 'asan',
    }],
    ['msan==1', {
      'sanitizer_type': 'msan',
    }],
    ['tsan==1', {
      'sanitizer_type': 'tsan',
    }],
    ['use_goma==1', {
      'cc': '<(gomadir)/gomacc <!(cd <(DEPTH) && pwd -P)/<(make_clang_dir)/bin/clang',
      'cxx': '<(gomadir)/gomacc <!(cd <(DEPTH) && pwd -P)/<(make_clang_dir)/bin/clang++',
    }, {
      'cc': '<!(cd <(DEPTH) && pwd -P)/<(make_clang_dir)/bin/clang',
      'cxx': '<!(cd <(DEPTH) && pwd -P)/<(make_clang_dir)/bin/clang++',
    }],
  ],

  'target_defaults': {
    'build_method': 'destdir',
    'extra_configure_flags': [],
    'jobs': '<(instrumented_libraries_jobs)',
    'package_cflags': [
      '-O2',
      '-gline-tables-only',
      '-fPIC',
      '-w',
      '-U_FORITFY_SOURCE'
    ],
    'package_ldflags': [
      '-Wl,-z,origin',
      # We set RPATH=XORIGIN when building the package and replace it with
      # $ORIGIN later. The reason is that this flag goes through configure/make
      # differently for different packages. Because of this, we can't escape the
      # $ character in a way that would work for every package.
      '-Wl,-R,XORIGIN/.'
    ],
    'patch': '',
    'run_before_build': '',
    'asan_blacklist': '',
    'msan_blacklist': '',
    'tsan_blacklist': '',

    'conditions': [
      ['asan==1', {
        'package_cflags': ['-fsanitize=address'],
        'package_ldflags': ['-fsanitize=address'],
      }],
      ['msan==1', {
        'package_cflags': [
          '-fsanitize=memory',
          '-fsanitize-memory-track-origins=<(msan_track_origins)'
        ],
        'package_ldflags': ['-fsanitize=memory'],
      }],
      ['tsan==1', {
        'package_cflags': ['-fsanitize=thread'],
        'package_ldflags': ['-fsanitize=thread'],
      }],
    ],
  },

  'targets': [
    {
      'target_name': 'instrumented_libraries',
      'type': 'none',
      'variables': {
        'prune_self_dependency': 1,
        # Don't add this target to the dependencies of targets with type=none.
        'link_dependency': 1,
      },
      'dependencies': [
        '<(_sanitizer_type)-libcairo2',
        '<(_sanitizer_type)-libexpat1',
        '<(_sanitizer_type)-libffi6',
        '<(_sanitizer_type)-libgcrypt11',
        '<(_sanitizer_type)-libgpg-error0',
        '<(_sanitizer_type)-libnspr4',
        '<(_sanitizer_type)-libp11-kit0',
        '<(_sanitizer_type)-libpcre3',
        '<(_sanitizer_type)-libpng12-0',
        '<(_sanitizer_type)-libx11-6',
        '<(_sanitizer_type)-libxau6',
        '<(_sanitizer_type)-libxcb1',
        '<(_sanitizer_type)-libxcomposite1',
        '<(_sanitizer_type)-libxcursor1',
        '<(_sanitizer_type)-libxdamage1',
        '<(_sanitizer_type)-libxdmcp6',
        '<(_sanitizer_type)-libxext6',
        '<(_sanitizer_type)-libxfixes3',
        '<(_sanitizer_type)-libxi6',
        '<(_sanitizer_type)-libxinerama1',
        '<(_sanitizer_type)-libxrandr2',
        '<(_sanitizer_type)-libxrender1',
        '<(_sanitizer_type)-libxss1',<commit_msg>Instrumented libraries: build freetype again.<commit_after># Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

{
  'variables': {
    'verbose_libraries_build%': 0,
    'instrumented_libraries_jobs%': 1,
  },

  'conditions': [
    ['asan==1', {
      'sanitizer_type': 'asan',
    }],
    ['msan==1', {
      'sanitizer_type': 'msan',
    }],
    ['tsan==1', {
      'sanitizer_type': 'tsan',
    }],
    ['use_goma==1', {
      'cc': '<(gomadir)/gomacc <!(cd <(DEPTH) && pwd -P)/<(make_clang_dir)/bin/clang',
      'cxx': '<(gomadir)/gomacc <!(cd <(DEPTH) && pwd -P)/<(make_clang_dir)/bin/clang++',
    }, {
      'cc': '<!(cd <(DEPTH) && pwd -P)/<(make_clang_dir)/bin/clang',
      'cxx': '<!(cd <(DEPTH) && pwd -P)/<(make_clang_dir)/bin/clang++',
    }],
  ],

  'target_defaults': {
    'build_method': 'destdir',
    'extra_configure_flags': [],
    'jobs': '<(instrumented_libraries_jobs)',
    'package_cflags': [
      '-O2',
      '-gline-tables-only',
      '-fPIC',
      '-w',
      '-U_FORITFY_SOURCE'
    ],
    'package_ldflags': [
      '-Wl,-z,origin',
      # We set RPATH=XORIGIN when building the package and replace it with
      # $ORIGIN later. The reason is that this flag goes through configure/make
      # differently for different packages. Because of this, we can't escape the
      # $ character in a way that would work for every package.
      '-Wl,-R,XORIGIN/.'
    ],
    'patch': '',
    'run_before_build': '',
    'asan_blacklist': '',
    'msan_blacklist': '',
    'tsan_blacklist': '',

    'conditions': [
      ['asan==1', {
        'package_cflags': ['-fsanitize=address'],
        'package_ldflags': ['-fsanitize=address'],
      }],
      ['msan==1', {
        'package_cflags': [
          '-fsanitize=memory',
          '-fsanitize-memory-track-origins=<(msan_track_origins)'
        ],
        'package_ldflags': ['-fsanitize=memory'],
      }],
      ['tsan==1', {
        'package_cflags': ['-fsanitize=thread'],
        'package_ldflags': ['-fsanitize=thread'],
      }],
    ],
  },

  'targets': [
    {
      'target_name': 'instrumented_libraries',
      'type': 'none',
      'variables': {
        'prune_self_dependency': 1,
        # Don't add this target to the dependencies of targets with type=none.
        'link_dependency': 1,
      },
      'dependencies': [
        '<(_sanitizer_type)-freetype',
        '<(_sanitizer_type)-libcairo2',
        '<(_sanitizer_type)-libexpat1',
        '<(_sanitizer_type)-libffi6',
        '<(_sanitizer_type)-libgcrypt11',
        '<(_sanitizer_type)-libgpg-error0',
        '<(_sanitizer_type)-libnspr4',
        '<(_sanitizer_type)-libp11-kit0',
        '<(_sanitizer_type)-libpcre3',
        '<(_sanitizer_type)-libpng12-0',
        '<(_sanitizer_type)-libx11-6',
        '<(_sanitizer_type)-libxau6',
        '<(_sanitizer_type)-libxcb1',
        '<(_sanitizer_type)-libxcomposite1',
        '<(_sanitizer_type)-libxcursor1',
        '<(_sanitizer_type)-libxdamage1',
        '<(_sanitizer_type)-libxdmcp6',
        '<(_sanitizer_type)-libxext6',
        '<(_sanitizer_type)-libxfixes3',
        '<(_sanitizer_type)-libxi6',
        '<(_sanitizer_type)-libxinerama1',
        '<(_sanitizer_type)-libxrandr2',
        '<(_sanitizer_type)-libxrender1',
        '<(_sanitizer_type)-libxss1',
{'fraction_non_alphanumeric': 0.1862846964524269, 'fraction_numerical': 0.013655929939142051, 'mean_word_length': 2.7021978021978024, 'pattern_counts': {'":': 0, '<': 82, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4440173', 'n_tokens_mistral': 2510, 'n_tokens_neox': 2500, 'n_words': 386}