Bug 1547193 - ANGLE cherry-pick environ solaris fix. r=lsalzman

Differential Revision: https://phabricator.services.mozilla.com/D34044

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jeff Gilbert 2019-06-06 21:46:43 +00:00
parent b17e1484eb
commit 224ede5084
11 changed files with 38 additions and 16 deletions

View File

@ -1,3 +1,3 @@
#define ANGLE_COMMIT_HASH "1d5494fc3e85"
#define ANGLE_COMMIT_HASH "ee49c7b031ea"
#define ANGLE_COMMIT_HASH_SIZE 12
#define ANGLE_COMMIT_DATE "2019-05-22 18:13:00 -0700"
#define ANGLE_COMMIT_DATE "2019-06-06 14:34:34 -0700"

View File

@ -15,10 +15,6 @@
#include <sys/wait.h>
#include <unistd.h>
// On BSDs (including mac), environ is not declared anywhere:
// https://stackoverflow.com/a/31347357/912144
extern char **environ;
namespace angle
{
@ -157,7 +153,7 @@ bool RunApp(const std::vector<const char *> &args,
}
}
// Execute the application, which doesn't return unless failed. Note: execve takes argv as
// Execute the application, which doesn't return unless failed. Note: execv takes argv as
// `char * const *` for historical reasons. It is safe to const_cast it:
//
// http://pubs.opengroup.org/onlinepubs/9699919799/functions/exec.html
@ -170,7 +166,7 @@ bool RunApp(const std::vector<const char *> &args,
// modify either the array of pointers or the characters to which the function points, but
// this would disallow existing correct code. Instead, only the array of pointers is noted
// as constant.
execve(args[0], const_cast<char *const *>(args.data()), environ);
execv(args[0], const_cast<char *const *>(args.data()));
_exit(errno);
}

View File

@ -1,3 +1,19 @@
commit ee49c7b031eaab9d9df23fa7fbc2fb5875397622
Author: Jeff Gilbert <jgilbert@mozilla.com>
Date: Wed Jun 5 17:32:32 2019 -0700
Use execv instead of execve w/ environ.
Some platforms don't want us messing with environ, and these seem to be
equivalent.
Bug: angleproject:3506
Change-Id: I66804e8accc30421c1cd32c0eda750500e3ecb60
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1646887
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
commit 1d5494fc3e856d4d722e266d2b2075debac5146f
Author: Jeff Gilbert <jgilbert@mozilla.com>
Date: Thu Apr 25 14:57:26 2019 -0700

View File

@ -11,7 +11,7 @@ DEFINES['DYNAMIC_ANNOTATIONS_ENABLED'] = '1'
#DEFINES['FULL_SAFE_BROWSING'] = True
DEFINES['NOMINMAX'] = True
#DEFINES['NO_TCMALLOC'] = True
DEFINES['NTDDI_VERSION'] = 'NTDDI_WIN10_RS2'
DEFINES['NTDDI_VERSION'] = '0x0A000003'
#DEFINES['PSAPI_VERSION'] = '2'
#DEFINES['SAFE_BROWSING_CSD'] = True
#DEFINES['SAFE_BROWSING_DB_LOCAL'] = True
@ -45,6 +45,7 @@ LOCAL_INCLUDES += [
#CXXFLAGS += [
# '/bigobj',
# '/d2FastFail',
# '/D__DATE__=',
# '/D__TIME__=',
# '/D__TIMESTAMP__=',

View File

@ -11,7 +11,7 @@ DEFINES['DYNAMIC_ANNOTATIONS_ENABLED'] = '1'
DEFINES['GPU_INFO_USE_SETUPAPI'] = True
DEFINES['NOMINMAX'] = True
#DEFINES['NO_TCMALLOC'] = True
DEFINES['NTDDI_VERSION'] = 'NTDDI_WIN10_RS2'
DEFINES['NTDDI_VERSION'] = '0x0A000003'
#DEFINES['PSAPI_VERSION'] = '2'
#DEFINES['SAFE_BROWSING_CSD'] = True
#DEFINES['SAFE_BROWSING_DB_LOCAL'] = True
@ -45,6 +45,7 @@ LOCAL_INCLUDES += [
#CXXFLAGS += [
# '/bigobj',
# '/d2FastFail',
# '/D__DATE__=',
# '/D__TIME__=',
# '/D__TIMESTAMP__=',

View File

@ -10,7 +10,7 @@ DEFINES['DYNAMIC_ANNOTATIONS_ENABLED'] = '1'
#DEFINES['FULL_SAFE_BROWSING'] = True
DEFINES['NOMINMAX'] = True
#DEFINES['NO_TCMALLOC'] = True
DEFINES['NTDDI_VERSION'] = 'NTDDI_WIN10_RS2'
DEFINES['NTDDI_VERSION'] = '0x0A000003'
#DEFINES['PSAPI_VERSION'] = '2'
#DEFINES['SAFE_BROWSING_CSD'] = True
#DEFINES['SAFE_BROWSING_DB_LOCAL'] = True
@ -44,6 +44,7 @@ LOCAL_INCLUDES += [
#CXXFLAGS += [
# '/bigobj',
# '/d2FastFail',
# '/D__DATE__=',
# '/D__TIME__=',
# '/D__TIMESTAMP__=',

View File

@ -16,7 +16,7 @@ DEFINES['DYNAMIC_ANNOTATIONS_ENABLED'] = '1'
DEFINES['LIBANGLE_IMPLEMENTATION'] = True
DEFINES['NOMINMAX'] = True
#DEFINES['NO_TCMALLOC'] = True
DEFINES['NTDDI_VERSION'] = 'NTDDI_WIN10_RS2'
DEFINES['NTDDI_VERSION'] = '0x0A000003'
#DEFINES['PSAPI_VERSION'] = '2'
#DEFINES['SAFE_BROWSING_CSD'] = True
#DEFINES['SAFE_BROWSING_DB_LOCAL'] = True
@ -50,6 +50,7 @@ LOCAL_INCLUDES += [
#CXXFLAGS += [
# '/bigobj',
# '/d2FastFail',
# '/D__DATE__=',
# '/D__TIME__=',
# '/D__TIMESTAMP__=',

View File

@ -20,7 +20,7 @@ DEFINES['GL_GLEXT_PROTOTYPES'] = True
DEFINES['LIBEGL_IMPLEMENTATION'] = True
DEFINES['NOMINMAX'] = True
#DEFINES['NO_TCMALLOC'] = True
DEFINES['NTDDI_VERSION'] = 'NTDDI_WIN10_RS2'
DEFINES['NTDDI_VERSION'] = '0x0A000003'
#DEFINES['PSAPI_VERSION'] = '2'
#DEFINES['SAFE_BROWSING_CSD'] = True
#DEFINES['SAFE_BROWSING_DB_LOCAL'] = True
@ -53,6 +53,7 @@ LOCAL_INCLUDES += [
#CXXFLAGS += [
# '/bigobj',
# '/d2FastFail',
# '/D__DATE__=',
# '/D__TIME__=',
# '/D__TIMESTAMP__=',
@ -164,6 +165,7 @@ OS_LIBS += [
#LDFLAGS += [
# '/DEBUG',
# '/DYNAMICBASE',
# '/fastfail',
# '/FIXED:NO',
# '/ignore:4199',
# '/ignore:4221',

View File

@ -21,7 +21,7 @@ DEFINES['LIBANGLE_IMPLEMENTATION'] = True
DEFINES['LIBGLESV2_IMPLEMENTATION'] = True
DEFINES['NOMINMAX'] = True
#DEFINES['NO_TCMALLOC'] = True
DEFINES['NTDDI_VERSION'] = 'NTDDI_WIN10_RS2'
DEFINES['NTDDI_VERSION'] = '0x0A000003'
#DEFINES['PSAPI_VERSION'] = '2'
#DEFINES['SAFE_BROWSING_CSD'] = True
#DEFINES['SAFE_BROWSING_DB_LOCAL'] = True
@ -55,6 +55,7 @@ LOCAL_INCLUDES += [
#CXXFLAGS += [
# '/bigobj',
# '/d2FastFail',
# '/D__DATE__=',
# '/D__TIME__=',
# '/D__TIMESTAMP__=',
@ -172,6 +173,7 @@ OS_LIBS += [
#LDFLAGS += [
# '/DEBUG',
# '/DYNAMICBASE',
# '/fastfail',
# '/FIXED:NO',
# '/ignore:4199',
# '/ignore:4221',

View File

@ -10,7 +10,7 @@ DEFINES['DYNAMIC_ANNOTATIONS_ENABLED'] = '1'
#DEFINES['FULL_SAFE_BROWSING'] = True
DEFINES['NOMINMAX'] = True
#DEFINES['NO_TCMALLOC'] = True
DEFINES['NTDDI_VERSION'] = 'NTDDI_WIN10_RS2'
DEFINES['NTDDI_VERSION'] = '0x0A000003'
#DEFINES['PSAPI_VERSION'] = '2'
#DEFINES['SAFE_BROWSING_CSD'] = True
#DEFINES['SAFE_BROWSING_DB_LOCAL'] = True
@ -44,6 +44,7 @@ LOCAL_INCLUDES += [
#CXXFLAGS += [
# '/bigobj',
# '/d2FastFail',
# '/D__DATE__=',
# '/D__TIME__=',
# '/D__TIMESTAMP__=',

View File

@ -13,7 +13,7 @@ DEFINES['DYNAMIC_ANNOTATIONS_ENABLED'] = '1'
#DEFINES['FULL_SAFE_BROWSING'] = True
DEFINES['NOMINMAX'] = True
#DEFINES['NO_TCMALLOC'] = True
DEFINES['NTDDI_VERSION'] = 'NTDDI_WIN10_RS2'
DEFINES['NTDDI_VERSION'] = '0x0A000003'
#DEFINES['PSAPI_VERSION'] = '2'
#DEFINES['SAFE_BROWSING_CSD'] = True
#DEFINES['SAFE_BROWSING_DB_LOCAL'] = True
@ -47,6 +47,7 @@ LOCAL_INCLUDES += [
#CXXFLAGS += [
# '/bigobj',
# '/d2FastFail',
# '/D__DATE__=',
# '/D__TIME__=',
# '/D__TIMESTAMP__=',