# Copyright 2012 the V8 project 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': { 'V8_ROOT': '../../deps/v8', 'v8_code': 1, 'v8_random_seed%': 314159265, 'v8_vector_stores%': 0, 'v8_embed_script%': "", 'mksnapshot_exec': '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFIX)', 'v8_os_page_size%': 0, 'generate_bytecode_output_root': '<(SHARED_INTERMEDIATE_DIR)/generate-bytecode-output-root', 'generate_bytecode_builtins_list_output': '<(generate_bytecode_output_root)/builtins-generated/bytecodes-builtins-list.h', 'torque_files': ['@(_outputs)', 'variables': { 'mksnapshot_flags': [ '--turbo_instruction_scheduling', # In cross builds, the snapshot may be generated for both the host and # target toolchains. The same host binary is used to generate both, so # mksnapshot needs to know which target OS to use at runtime. It's weird, # but the target OS is really <(OS). '--target_os=<(OS)', '--target_arch=<(v8_target_arch)', '--startup_src', '<(INTERMEDIATE_DIR)/snapshot.cc', '--embedded_variant', 'Default', '--embedded_src', '<(INTERMEDIATE_DIR)/embedded.S', ], }, 'inputs': [ '<(mksnapshot_exec)', ], 'outputs': [ '<(INTERMEDIATE_DIR)/snapshot.cc', '<(INTERMEDIATE_DIR)/embedded.S', ], 'process_outputs_as_sources': 1, 'conditions': [ ['v8_random_seed', { 'variables': { 'mksnapshot_flags': ['--random-seed', '<(v8_random_seed)'], }, }], ['v8_os_page_size', { 'variables': { 'mksnapshot_flags': ['--v8_os_page_size', '<(v8_os_page_size)'], }, }], ['v8_embed_script != ""', { 'inputs': ['<(v8_embed_script)'], 'variables': { 'mksnapshot_flags': ['<(v8_embed_script)'], }, }], ['v8_enable_snapshot_code_comments', { 'variables': { 'mksnapshot_flags': ['--code-comments'], }, }], ['v8_enable_snapshot_native_code_counters', { 'variables': { 'mksnapshot_flags': ['--native-code-counters'], }, }, { # --native-code-counters is the default in debug mode so make sure we can # unset it. 'variables': { 'mksnapshot_flags': ['--no-native-code-counters'], }, }], ], 'action': [ '>@(_inputs)', '>@(mksnapshot_flags)', ], }, ], }, # v8_snapshot { 'target_name': 'v8_version', 'type': 'none', 'toolsets': ['host', 'target'], 'direct_dependent_settings': { 'sources': [ '<(V8_ROOT)/include/v8-value-serializer-version.h', '<(V8_ROOT)/include/v8-version-string.h', '<(V8_ROOT)/include/v8-version.h', ], }, }, # v8_version { 'target_name': 'v8_config_headers', 'type': 'none', 'toolsets': ['host', 'target'], 'direct_dependent_settings': { 'sources': [ '<(V8_ROOT)/include/v8-platform.h', '<(V8_ROOT)/include/v8config.h', ], }, }, # v8_config_headers { 'target_name': 'v8_headers', 'type': 'none', 'toolsets': ['host', 'target'], 'dependencies': [ 'v8_config_headers', 'v8_heap_base_headers', 'v8_version', ], 'direct_dependent_settings': { 'sources': [ '