Commit 89f9d2de authored by noelallen@google.com's avatar noelallen@google.com

Revert 111618 - Reapply of http://codereview.chromium.org/8632023/

The original CL failed on Mac.

Avoid references to untrusted.gypi in WebKit

Remove include of untrusted.gypi in normal ppapi gyp files
to prevent WebKit from depending on NaCl.

Refactor PPAPI gyp files to pull out source lists which are
shared between trusted and untrusted targets.

Fix scons hack which pulls list of sources from GYP so that
we can build with scons.

This CL should allow us to revert the DEPS change:
http://trac.webkit.org/changeset/101011 on the webkit side


BUG= none
TEST= Tools/Scripts/update-webkit --chromium
TRB= dmichael@chromium.org
Review URL: http://codereview.chromium.org/8701008

TBR=noelallen@google.com
Review URL: http://codereview.chromium.org/8701010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111621 0039d316-1c4b-4281-b951-d872f2087c98
parent 7cba0ea4
...@@ -8,7 +8,7 @@ vars = { ...@@ -8,7 +8,7 @@ vars = {
"webkit_revision": "101168", "webkit_revision": "101168",
"chromium_git": "http://git.chromium.org/git", "chromium_git": "http://git.chromium.org/git",
"swig_revision": "69281", "swig_revision": "69281",
"nacl_revision": "7272", "nacl_revision": "7169",
# After changing nacl_revision, run 'glient sync' and check native_client/DEPS # After changing nacl_revision, run 'glient sync' and check native_client/DEPS
# to update other nacl_*_revision's. # to update other nacl_*_revision's.
"nacl_tools_revision": "7139", # native_client/DEPS: tools_rev "nacl_tools_revision": "7139", # native_client/DEPS: tools_rev
......
...@@ -799,7 +799,7 @@ ...@@ -799,7 +799,7 @@
'conditions': [ 'conditions': [
['disable_nacl!=1', { ['disable_nacl!=1', {
'dependencies': [ 'dependencies': [
'../ppapi/ppapi_untrusted.gyp:ppapi_nacl_tests', '../ppapi/ppapi_internal.gyp:ppapi_nacl_tests',
], ],
'copies': [ 'copies': [
{ {
......
...@@ -16,24 +16,17 @@ Dir('.').addRepository(Dir('#/../ppapi')) ...@@ -16,24 +16,17 @@ Dir('.').addRepository(Dir('#/../ppapi'))
env.FilterOut(CCFLAGS=['-Wswitch-enum']) env.FilterOut(CCFLAGS=['-Wswitch-enum'])
# Load ppapi_cpp.gypi # Load ppapi_cpp.gypi
# Unfortunately gyp_extract does not handle variables or includes so we must
# pull the list of sources from ppapi_sources.gypi directly.
ppapi_sources_gypi = open(
env.File('$SOURCE_ROOT/ppapi/ppapi_sources.gypi').abspath, 'r').read()
ppapi_sources_list = eval(ppapi_sources_gypi)['variables']['cpp_sources']
# From ppapi_cpp.gypi:ppapi_cpp:.*\.cc
ppapi_cpp_gypi = gyp_extract.LoadGypFile( ppapi_cpp_gypi = gyp_extract.LoadGypFile(
env.File('$SOURCE_ROOT/ppapi/ppapi_cpp.gypi').abspath) env.File('$SOURCE_ROOT/ppapi/ppapi_cpp.gypi').abspath)
# From ppapi_cpp.gypi:ppapi_cpp_objects:.*\.cc
# From ppapi_cpp.gypi:ppapi_cpp:.*\.cc
cpp_sources = ( cpp_sources = (
[src for src in ppapi_sources_list if src.endswith('.cc')] + gyp_extract.GypTargetSources(
ppapi_cpp_gypi, 'ppapi_cpp_objects', '.*\.cc') +
gyp_extract.GypTargetSources( gyp_extract.GypTargetSources(
ppapi_cpp_gypi, 'ppapi_cpp', '.*\.cc') ppapi_cpp_gypi, 'ppapi_cpp', '.*\.cc')
) )
libppapi_cpp = env.NaClSdkLibrary('libppapi_cpp', cpp_sources) libppapi_cpp = env.NaClSdkLibrary('libppapi_cpp', cpp_sources)
env.AddLibraryToSdk(libppapi_cpp) env.AddLibraryToSdk(libppapi_cpp)
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
], ],
}, },
'includes': [ 'includes': [
'ppapi_sources.gypi', '../native_client/build/untrusted.gypi',
'ppapi_cpp.gypi', 'ppapi_cpp.gypi',
'ppapi_gl.gypi', 'ppapi_gl.gypi',
], ],
......
This diff is collapsed.
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
], ],
}, },
'includes': [ 'includes': [
'ppapi_sources.gypi', '../native_client/build/untrusted.gypi',
'ppapi_proxy.gypi', 'ppapi_proxy.gypi',
'ppapi_shared.gypi', 'ppapi_shared.gypi',
'ppapi_tests.gypi', 'ppapi_tests.gypi',
......
This diff is collapsed.
...@@ -64,7 +64,89 @@ ...@@ -64,7 +64,89 @@
'lib/gl/include', 'lib/gl/include',
], ],
'sources': [ 'sources': [
'<@(test_sources)', # Common test files.
'tests/test_case.cc',
'tests/test_case.h',
'tests/testing_instance.cc',
'tests/testing_instance.h',
# Test cases.
'tests/all_c_includes.h',
'tests/all_cpp_includes.h',
'tests/arch_dependent_sizes_32.h',
'tests/arch_dependent_sizes_64.h',
'tests/pp_thread.h',
'tests/test_broker.cc',
'tests/test_broker.h',
'tests/test_buffer.cc',
'tests/test_buffer.h',
'tests/test_c_includes.c',
'tests/test_char_set.cc',
'tests/test_char_set.h',
'tests/test_core.cc',
'tests/test_core.h',
'tests/test_cpp_includes.cc',
'tests/test_crypto.cc',
'tests/test_crypto.h',
'tests/test_cursor_control.cc',
'tests/test_cursor_control.h',
'tests/test_directory_reader.cc',
'tests/test_directory_reader.h',
'tests/test_file_io.cc',
'tests/test_file_io.h',
'tests/test_file_ref.cc',
'tests/test_file_ref.h',
'tests/test_file_system.cc',
'tests/test_file_system.h',
'tests/test_flash.cc',
'tests/test_flash.h',
'tests/test_flash_clipboard.cc',
'tests/test_flash_clipboard.h',
'tests/test_flash_fullscreen.cc',
'tests/test_flash_fullscreen.h',
'tests/test_fullscreen.cc',
'tests/test_fullscreen.h',
'tests/test_graphics_2d.cc',
'tests/test_graphics_2d.h',
'tests/test_graphics_3d.cc',
'tests/test_graphics_3d.h',
'tests/test_image_data.cc',
'tests/test_image_data.h',
'tests/test_input_event.cc',
'tests/test_input_event.h',
'tests/test_memory.cc',
'tests/test_memory.h',
'tests/test_net_address_private.cc',
'tests/test_net_address_private.h',
'tests/test_paint_aggregator.cc',
'tests/test_paint_aggregator.h',
'tests/test_post_message.cc',
'tests/test_post_message.h',
'tests/test_scrollbar.cc',
'tests/test_scrollbar.h',
'tests/test_struct_sizes.c',
'tests/test_tcp_socket_private.cc',
'tests/test_tcp_socket_private.h',
'tests/test_uma.cc',
'tests/test_uma.h',
'tests/test_url_loader.cc',
'tests/test_url_loader.h',
'tests/test_url_util.cc',
'tests/test_url_util.h',
'tests/test_utils.cc',
'tests/test_utils.h',
'tests/test_var.cc',
'tests/test_var.h',
'tests/test_video_decoder.cc',
'tests/test_video_decoder.h',
'tests/test_websocket.cc',
'tests/test_websocket.h',
# Deprecated test cases.
'tests/test_instance_deprecated.cc',
'tests/test_instance_deprecated.h',
'tests/test_var_deprecated.cc',
'tests/test_var_deprecated.h',
], ],
'dependencies': [ 'dependencies': [
'ppapi.gyp:ppapi_cpp', 'ppapi.gyp:ppapi_cpp',
...@@ -226,6 +308,16 @@ ...@@ -226,6 +308,16 @@
'examples/audio/audio.cc', 'examples/audio/audio.cc',
], ],
}, },
{
'target_name': 'ppapi_example_audio_input',
'dependencies': [
'ppapi_example_skeleton',
'ppapi.gyp:ppapi_cpp',
],
'sources': [
'examples/audio_input/audio_input.cc',
],
},
{ {
'target_name': 'ppapi_example_file_chooser', 'target_name': 'ppapi_example_file_chooser',
'dependencies': [ 'dependencies': [
...@@ -338,4 +430,96 @@ ...@@ -338,4 +430,96 @@
], ],
}, },
], ],
'conditions': [
['disable_nacl!=1', {
'targets': [
{
'target_name': 'ppapi_nacl_tests',
'type': 'none',
'dependencies': [
'native_client/native_client.gyp:ppapi_lib',
'native_client/native_client.gyp:nacl_irt',
'ppapi.gyp:ppapi_cpp_lib',
],
'variables': {
'nexe_target': 'ppapi_nacl_tests',
'build_glibc': 0,
'build_newlib': 1,
'include_dirs': [
'lib/gl/include',
'..',
],
'link_flags': [
'-lppapi_cpp',
'-lppapi',
],
'extra_deps64': [
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libppapi_cpp.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64/libppapi.a',
],
'extra_deps32': [
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libppapi_cpp.a',
'<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32/libppapi.a',
],
'sources': [
# Common test files
'tests/test_case.cc',
'tests/test_utils.cc',
'tests/testing_instance.cc',
# Compile-time tests
'tests/test_c_includes.c',
'tests/test_cpp_includes.cc',
'tests/test_struct_sizes.c',
# Test cases (PLEASE KEEP THIS SECTION IN ALPHABETICAL ORDER)
# Add/uncomment PPAPI interfaces below when they get proxied.
# Not yet proxied.
#'test_broker.cc',
# Not yet proxied.
#'test_buffer.cc',
# Not yet proxied.
#'test_char_set.cc',
'tests/test_cursor_control.cc',
# Fails in DeleteDirectoryRecursively.
# BUG: http://code.google.com/p/nativeclient/issues/detail?id=2107
#'test_directory_reader.cc',
'tests/test_file_io.cc',
'tests/test_file_ref.cc',
'tests/test_file_system.cc',
'tests/test_memory.cc',
'tests/test_graphics_2d.cc',
'tests/test_image_data.cc',
'tests/test_paint_aggregator.cc',
# test_post_message.cc relies on synchronous scripting, which is not
# available for untrusted tests.
# Does not compile under nacl (uses private interface ExecuteScript).
#'test_post_message.cc',
'tests/test_scrollbar.cc',
# Not yet proxied.
#'tests/test_transport.cc',
# Not yet proxied.
#'tests/test_uma.cc',
# Activating the URL loader test requires a test httpd that
# understands HTTP POST, which our current httpd.py doesn't.
# It also requires deactivating the tests that use FileIOTrusted
# when running in NaCl.
#'tests/test_url_loader.cc',
# Does not compile under nacl (uses VarPrivate).
#'test_url_util.cc',
# Not yet proxied.
#'test_video_decoder.cc',
'tests/test_var.cc',
# Deprecated test cases.
#'tests/test_instance_deprecated.cc',
# Var_deprecated fails in TestPassReference, and we probably won't
# fix it.
#'tests/test_var_deprecated.cc'
],
},
},
],
}],
],
} }
# Copyright (c) 2011 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.
# This GYP file defines untrusted (NaCl) targets. All targets in this
# file should be conditionally depended upon via 'disable_nacl!=1' to avoid
# requiring NaCl sources for building.
{
'includes': [
'../native_client/build/untrusted.gypi',
'ppapi_sources.gypi',
],
'targets': [
{
'target_name': 'ppapi_cpp_lib',
'type': 'none',
'variables': {
'nlib_target': 'libppapi_cpp.a',
'build_glibc': 0,
'build_newlib': 1,
'sources': [
'<@(cpp_sources)',
'cpp/module_embedder.h',
'cpp/ppp_entrypoints.cc',
],
},
'dependencies': [
'<(DEPTH)/native_client/tools.gyp:prep_toolchain',
],
},
{
'target_name': 'ppapi_nacl_tests',
'type': 'none',
'dependencies': [
'ppapi_cpp_lib',
'native_client/native_client.gyp:ppapi_lib',
'native_client/native_client.gyp:nacl_irt',
],
'variables': {
'nexe_target': 'ppapi_nacl_tests',
'build_glibc': 0,
'build_newlib': 1,
'include_dirs': [
'lib/gl/include',
'..',
],
'link_flags': [
'-lppapi_cpp',
'-lppapi',
],
'extra_deps64': [
'<(PRODUCT_DIR)/obj/gen/tc_newlib/lib64/libppapi_cpp.a',
'<(PRODUCT_DIR)/obj/gen/tc_newlib/lib64/libppapi.a',
],
'extra_deps32': [
'<(PRODUCT_DIR)/obj/gen/tc_newlib/lib32/libppapi_cpp.a',
'<(PRODUCT_DIR)/obj/gen/tc_newlib/lib32/libppapi.a',
],
'sources': [
# Common test files
'tests/test_case.cc',
'tests/test_utils.cc',
'tests/testing_instance.cc',
# Compile-time tests
'tests/test_c_includes.c',
'tests/test_cpp_includes.cc',
'tests/test_struct_sizes.c',
# Test cases (PLEASE KEEP THIS SECTION IN ALPHABETICAL ORDER)
# Add/uncomment PPAPI interfaces below when they get proxied.
# Not yet proxied.
#'test_broker.cc',
# Not yet proxied.
#'test_buffer.cc',
# Not yet proxied.
#'test_char_set.cc',
'tests/test_cursor_control.cc',
# Fails in DeleteDirectoryRecursively.
# BUG: http://code.google.com/p/nativeclient/issues/detail?id=2107
#'test_directory_reader.cc',
'tests/test_file_io.cc',
'tests/test_file_ref.cc',
'tests/test_file_system.cc',
'tests/test_memory.cc',
'tests/test_graphics_2d.cc',
'tests/test_image_data.cc',
'tests/test_paint_aggregator.cc',
# test_post_message.cc relies on synchronous scripting, which is not
# available for untrusted tests.
# Does not compile under nacl (uses private interface ExecuteScript).
#'test_post_message.cc',
'tests/test_scrollbar.cc',
# Not yet proxied.
#'tests/test_transport.cc',
# Not yet proxied.
#'tests/test_uma.cc',
# Activating the URL loader test requires a test httpd that
# understands HTTP POST, which our current httpd.py doesn't.
# It also requires deactivating the tests that use FileIOTrusted
# when running in NaCl.
#'tests/test_url_loader.cc',
# Does not compile under nacl (uses VarPrivate).
#'test_url_util.cc',
# Not yet proxied.
#'test_video_decoder.cc',
'tests/test_var.cc',
# Deprecated test cases.
#'tests/test_instance_deprecated.cc',
# Var_deprecated fails in TestPassReference, and we probably won't
# fix it.
#'tests/test_var_deprecated.cc'
],
},
},
],
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment