Commit 23e554e0 authored by bbudge@chromium.org's avatar bbudge@chromium.org

Eliminate the 'build_ppapi_ipc_proxy_untrusted' build flag for untrusted PPAPI proxy builds.

This CL removes our custom GYP flag and modifies the build so both the SRPC and IPC proxies are built side by side. In addition, NaClBrowser now checks the '--enable-nacl-ipc-proxy' flag to determine which IRT to load. The IPC proxy's name is of the form 'nacl_ipc_irt_*'. 

BUG=116317
TEST=builds and runs NaCl apps with --enable-nacl-ipc-proxy
TBR=bbudge@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10831316

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151693 0039d316-1c4b-4281-b951-d872f2087c98
parent 1e46ff62
...@@ -156,14 +156,6 @@ ...@@ -156,14 +156,6 @@
'../net/third_party/nss/ssl.gyp:*', '../net/third_party/nss/ssl.gyp:*',
], ],
}], }],
['disable_nacl==0 and disable_nacl_untrusted==0', {
'dependencies': [
'../base/base_untrusted.gyp:*',
'../ipc/ipc_untrusted.gyp:*',
'../ppapi/ppapi_proxy_untrusted.gyp:*',
'../ppapi/ppapi_shared_untrusted.gyp:*',
],
}],
], ],
}, # target_name: All }, # target_name: All
{ {
...@@ -244,12 +236,6 @@ ...@@ -244,12 +236,6 @@
'../sandbox/sandbox.gyp:sandbox_linux_unittests', '../sandbox/sandbox.gyp:sandbox_linux_unittests',
], ],
}], }],
['disable_nacl==0 and disable_nacl_untrusted==0', {
'dependencies': [
# TODO(bbudge): drop this when we have switched the NaCl proxy to IPC.
'../ppapi/ppapi_proxy_untrusted.gyp:ppapi_proxy_untrusted',
],
}],
], ],
}, # target_name: chromium_builder_tests }, # target_name: chromium_builder_tests
{ {
......
...@@ -294,11 +294,6 @@ ...@@ -294,11 +294,6 @@
# plugins to make call of the main thread. # plugins to make call of the main thread.
'enable_pepper_threading%': 0, 'enable_pepper_threading%': 0,
# Include the PPAPI IPC proxy for NaCl. This is a work-in-progress; this
# allows us to build this feature locally without it affecting others
# working in affected subsystems like base and ipc.
'build_ppapi_ipc_proxy_untrusted%': 0,
# Enables use of the session service, which is enabled by default. # Enables use of the session service, which is enabled by default.
# Support for disabling depends on the platform. # Support for disabling depends on the platform.
'enable_session_service%': 1, 'enable_session_service%': 1,
...@@ -558,7 +553,6 @@ ...@@ -558,7 +553,6 @@
'use_gnome_keyring%': '<(use_gnome_keyring)', 'use_gnome_keyring%': '<(use_gnome_keyring)',
'linux_fpic%': '<(linux_fpic)', 'linux_fpic%': '<(linux_fpic)',
'enable_pepper_threading%': '<(enable_pepper_threading)', 'enable_pepper_threading%': '<(enable_pepper_threading)',
'build_ppapi_ipc_proxy_untrusted%': '<(build_ppapi_ipc_proxy_untrusted)',
'chromeos%': '<(chromeos)', 'chromeos%': '<(chromeos)',
'enable_viewport%': '<(enable_viewport)', 'enable_viewport%': '<(enable_viewport)',
'enable_hidpi%': '<(enable_hidpi)', 'enable_hidpi%': '<(enable_hidpi)',
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include "chrome/browser/nacl_host/nacl_browser.h" #include "chrome/browser/nacl_host/nacl_browser.h"
#include "base/command_line.h"
#include "base/message_loop.h" #include "base/message_loop.h"
#include "base/metrics/histogram.h" #include "base/metrics/histogram.h"
#include "base/path_service.h" #include "base/path_service.h"
...@@ -12,6 +13,7 @@ ...@@ -12,6 +13,7 @@
#include "build/build_config.h" #include "build/build_config.h"
#include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_paths_internal.h" #include "chrome/common/chrome_paths_internal.h"
#include "chrome/common/chrome_switches.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
namespace { namespace {
...@@ -30,13 +32,14 @@ enum ValidationCacheStatus { ...@@ -30,13 +32,14 @@ enum ValidationCacheStatus {
CACHE_MAX CACHE_MAX
}; };
// Determine the name of the IRT file based on the architecture.
#define NACL_IRT_FILE_NAME(arch_string) \
(FILE_PATH_LITERAL("nacl_irt_") \
FILE_PATH_LITERAL(arch_string) \
FILE_PATH_LITERAL(".nexe"))
const FilePath::StringType NaClIrtName() { const FilePath::StringType NaClIrtName() {
FilePath::StringType irt_name;
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableNaClIPCProxy))
irt_name.append(FILE_PATH_LITERAL("nacl_ipc_irt_"));
else
irt_name.append(FILE_PATH_LITERAL("nacl_irt_"));
#if defined(ARCH_CPU_X86_FAMILY) #if defined(ARCH_CPU_X86_FAMILY)
#if defined(ARCH_CPU_X86_64) #if defined(ARCH_CPU_X86_64)
bool is64 = true; bool is64 = true;
...@@ -46,15 +49,21 @@ const FilePath::StringType NaClIrtName() { ...@@ -46,15 +49,21 @@ const FilePath::StringType NaClIrtName() {
#else #else
bool is64 = false; bool is64 = false;
#endif #endif
return is64 ? NACL_IRT_FILE_NAME("x86_64") : NACL_IRT_FILE_NAME("x86_32"); if (is64)
irt_name.append(FILE_PATH_LITERAL("x86_64"));
else
irt_name.append(FILE_PATH_LITERAL("x86_32"));
#elif defined(ARCH_CPU_ARMEL) #elif defined(ARCH_CPU_ARMEL)
// TODO(mcgrathr): Eventually we'll need to distinguish arm32 vs thumb2. // TODO(mcgrathr): Eventually we'll need to distinguish arm32 vs thumb2.
// That may need to be based on the actual nexe rather than a static // That may need to be based on the actual nexe rather than a static
// choice, which would require substantial refactoring. // choice, which would require substantial refactoring.
return NACL_IRT_FILE_NAME("arm"); irt_name.append(FILE_PATH_LITERAL("arm"));
#else #else
#error Add support for your architecture to NaCl IRT file selection #error Add support for your architecture to NaCl IRT file selection
#endif #endif
irt_name.append(FILE_PATH_LITERAL(".nexe"));
return irt_name;
} }
bool CheckEnvVar(const char* name, bool default_value) { bool CheckEnvVar(const char* name, bool default_value) {
......
...@@ -80,6 +80,7 @@ ...@@ -80,6 +80,7 @@
['disable_nacl_untrusted==0', { ['disable_nacl_untrusted==0', {
'dependencies': [ 'dependencies': [
'../ppapi/native_client/native_client.gyp:nacl_irt', '../ppapi/native_client/native_client.gyp:nacl_irt',
'../ppapi/native_client/native_client.gyp:nacl_ipc_irt',
], ],
}], }],
], ],
......
...@@ -53,12 +53,6 @@ ...@@ -53,12 +53,6 @@
}, },
], ],
}, },
],
}],
# TODO(bbudge) Remove the build_ppapi_ipc_proxy_untrusted flag, factor out common
# properties from both IRT flavors, and build them side by side.
['disable_nacl==0 and disable_nacl_untrusted==0 and build_ppapi_ipc_proxy_untrusted==0', {
'targets': [
{ {
'target_name': 'nacl_irt', 'target_name': 'nacl_irt',
'type': 'none', 'type': 'none',
...@@ -183,20 +177,16 @@ ...@@ -183,20 +177,16 @@
'../../native_client/src/shared/gio/gio.gyp:gio_lib', '../../native_client/src/shared/gio/gio.gyp:gio_lib',
], ],
}, },
],
}],
['disable_nacl==0 and disable_nacl_untrusted==0 and build_ppapi_ipc_proxy_untrusted==1', {
'targets': [
{ {
'target_name': 'nacl_irt', 'target_name': 'nacl_ipc_irt',
'type': 'none', 'type': 'none',
'variables': { 'variables': {
'nexe_target': 'nacl_irt', 'nexe_target': 'nacl_ipc_irt',
# These out_* fields override the default filenames, which # These out_* fields override the default filenames, which
# include a "_newlib" suffix. # include a "_newlib" suffix.
'out_newlib64': '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe', 'out_newlib64': '<(PRODUCT_DIR)/nacl_ipc_irt_x86_64.nexe',
'out_newlib32': '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe', 'out_newlib32': '<(PRODUCT_DIR)/nacl_ipc_irt_x86_32.nexe',
'out_newlib_arm': '<(PRODUCT_DIR)/nacl_irt_arm.nexe', 'out_newlib_arm': '<(PRODUCT_DIR)/nacl_ipc_irt_arm.nexe',
'build_glibc': 0, 'build_glibc': 0,
'build_newlib': 1, 'build_newlib': 1,
'include_dirs': [ 'include_dirs': [
...@@ -375,7 +365,7 @@ ...@@ -375,7 +365,7 @@
], ],
}, },
'dependencies': [ 'dependencies': [
'../ppapi_proxy_untrusted.gyp:ppapi_proxy_untrusted', '../ppapi_ipc_proxy_untrusted.gyp:ppapi_proxy_untrusted',
'../ppapi_shared_untrusted.gyp:ppapi_shared_untrusted', '../ppapi_shared_untrusted.gyp:ppapi_shared_untrusted',
'../../gpu/command_buffer/command_buffer_untrusted.gyp:gles2_utils_untrusted', '../../gpu/command_buffer/command_buffer_untrusted.gyp:gles2_utils_untrusted',
'../../gpu/gpu_untrusted.gyp:command_buffer_client_untrusted', '../../gpu/gpu_untrusted.gyp:command_buffer_client_untrusted',
......
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