summaryrefslogtreecommitdiffstats
path: root/native_client_sdk
diff options
context:
space:
mode:
authornoelallen@chromium.org <noelallen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-09 01:59:34 +0000
committernoelallen@chromium.org <noelallen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-09 01:59:34 +0000
commit51fe54387a06ad138e2fac2a9fbac353dd761384 (patch)
tree7aa3c4dd5bc190db628addc04159b59104d1e77f /native_client_sdk
parent23f0687386959d7b7fcf4c14e8281fcdfd144c1c (diff)
downloadchromium_src-51fe54387a06ad138e2fac2a9fbac353dd761384.zip
chromium_src-51fe54387a06ad138e2fac2a9fbac353dd761384.tar.gz
chromium_src-51fe54387a06ad138e2fac2a9fbac353dd761384.tar.bz2
Move headers
Host and NaCl builds currently use different headers which can cause build problems. This change moves the headers out of the toolchains and instead all toolchains share the same set as the host builds. NOTRY=true BUG=168718 R=binji@chromium.org Review URL: https://chromiumcodereview.appspot.com/11825003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175666 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk')
-rwxr-xr-xnative_client_sdk/src/build_tools/build_sdk.py80
-rw-r--r--native_client_sdk/src/libraries/ppapi_cpp/library.dsc2
2 files changed, 38 insertions, 44 deletions
diff --git a/native_client_sdk/src/build_tools/build_sdk.py b/native_client_sdk/src/build_tools/build_sdk.py
index 96318e7..7ed8506 100755
--- a/native_client_sdk/src/build_tools/build_sdk.py
+++ b/native_client_sdk/src/build_tools/build_sdk.py
@@ -274,26 +274,13 @@ HEADER_MAP = {
'irt.h': 'src/untrusted/irt/irt.h',
'irt_ppapi.h': 'src/untrusted/irt/irt_ppapi.h',
},
- 'libs': {
+ 'host': {
},
}
-
-def InstallHeaders(tc_dst_inc, pepper_ver, tc_name):
- """Copies NaCl headers to expected locations in the toolchain."""
- if tc_name == 'arm':
- # arm toolchain header should be the same as the x86 newlib
- # ones
- tc_name = 'newlib'
- tc_map = HEADER_MAP[tc_name]
- for filename in tc_map:
- src = os.path.join(NACL_DIR, tc_map[filename])
- dst = os.path.join(tc_dst_inc, filename)
- buildbot_common.MakeDir(os.path.dirname(dst))
- buildbot_common.CopyFile(src, dst)
-
+def InstallCommonHeaders(inc_path):
# Clean out per toolchain ppapi directory
- ppapi = os.path.join(tc_dst_inc, 'ppapi')
+ ppapi = os.path.join(inc_path, 'ppapi')
buildbot_common.RemoveDir(ppapi)
# Copy in c and c/dev headers
@@ -303,14 +290,6 @@ def InstallHeaders(tc_dst_inc, pepper_ver, tc_name):
buildbot_common.CopyDir(os.path.join(PPAPI_DIR, 'c', 'dev', '*.h'),
os.path.join(ppapi, 'c', 'dev'))
- # Run the generator to overwrite IDL files
- generator_args = [sys.executable, 'generator.py', '--wnone', '--cgen',
- '--verbose', '--dstroot=%s/c' % ppapi]
- if pepper_ver:
- generator_args.append('--release=M' + pepper_ver)
- buildbot_common.Run(generator_args,
- cwd=os.path.join(PPAPI_DIR, 'generators'))
-
# Remove private and trusted interfaces
buildbot_common.RemoveDir(os.path.join(ppapi, 'c', 'private'))
buildbot_common.RemoveDir(os.path.join(ppapi, 'c', 'trusted'))
@@ -341,26 +320,41 @@ def InstallHeaders(tc_dst_inc, pepper_ver, tc_name):
os.path.join(ppapi, 'gles2'))
# Copy the EGL headers
- buildbot_common.MakeDir(os.path.join(tc_dst_inc, 'EGL'))
+ buildbot_common.MakeDir(os.path.join(inc_path, 'EGL'))
buildbot_common.CopyDir(
os.path.join(PPAPI_DIR, 'lib', 'gl', 'include', 'EGL', '*.h'),
- os.path.join(tc_dst_inc, 'EGL'))
+ os.path.join(inc_path, 'EGL'))
# Copy the GLES2 headers
- buildbot_common.MakeDir(os.path.join(tc_dst_inc, 'GLES2'))
+ buildbot_common.MakeDir(os.path.join(inc_path, 'GLES2'))
buildbot_common.CopyDir(
os.path.join(PPAPI_DIR, 'lib', 'gl', 'include', 'GLES2', '*.h'),
- os.path.join(tc_dst_inc, 'GLES2'))
+ os.path.join(inc_path, 'GLES2'))
# Copy the KHR headers
- buildbot_common.MakeDir(os.path.join(tc_dst_inc, 'KHR'))
+ buildbot_common.MakeDir(os.path.join(inc_path, 'KHR'))
buildbot_common.CopyDir(
os.path.join(PPAPI_DIR, 'lib', 'gl', 'include', 'KHR', '*.h'),
- os.path.join(tc_dst_inc, 'KHR'))
+ os.path.join(inc_path, 'KHR'))
# Copy the lib files
buildbot_common.CopyDir(os.path.join(PPAPI_DIR, 'lib'),
- os.path.join(tc_dst_inc, 'ppapi'))
+ os.path.join(inc_path, 'ppapi'))
+
+
+def InstallNaClHeaders(tc_dst_inc, pepper_ver, tc_name):
+ """Copies NaCl headers to expected locations in the toolchain."""
+ if tc_name == 'arm':
+ # arm toolchain header should be the same as the x86 newlib
+ # ones
+ tc_name = 'newlib'
+ tc_map = HEADER_MAP[tc_name]
+
+ for filename in tc_map:
+ src = os.path.join(NACL_DIR, tc_map[filename])
+ dst = os.path.join(tc_dst_inc, filename)
+ buildbot_common.MakeDir(os.path.dirname(dst))
+ buildbot_common.CopyFile(src, dst)
def MakeNinjaRelPath(path):
@@ -546,20 +540,20 @@ def BuildStepBuildToolchains(pepperdir, platform, pepper_ver, toolchains):
GypNinjaInstall(pepperdir, platform, toolchains)
if 'newlib' in toolchains:
- InstallHeaders(GetToolchainNaClInclude('newlib', newlibdir, 'x86'),
- pepper_ver,
- 'newlib')
+ InstallNaClHeaders(GetToolchainNaClInclude('newlib', newlibdir, 'x86'),
+ pepper_ver,
+ 'newlib')
if 'glibc' in toolchains:
- InstallHeaders(GetToolchainNaClInclude('glibc', glibcdir, 'x86'),
- pepper_ver,
- 'glibc')
+ InstallNaClHeaders(GetToolchainNaClInclude('glibc', glibcdir, 'x86'),
+ pepper_ver,
+ 'glibc')
if 'arm' in toolchains:
tcname = platform + '_arm_newlib'
armdir = os.path.join(pepperdir, 'toolchain', tcname)
- InstallHeaders(GetToolchainNaClInclude('newlib', armdir, 'arm'),
- pepper_ver, 'arm')
+ InstallNaClHeaders(GetToolchainNaClInclude('newlib', armdir, 'arm'),
+ pepper_ver, 'arm')
if 'pnacl' in toolchains:
shell = platform == 'win'
@@ -583,9 +577,9 @@ def BuildStepBuildToolchains(pepperdir, platform, pepper_ver, toolchains):
os.path.join(release_build_dir, 'libpnacl_irt_shim.a'),
GetPNaClNativeLib(pnacldir, pnacl_libdir_map[arch]))
- InstallHeaders(GetToolchainNaClInclude('pnacl', pnacldir, 'x86'),
- pepper_ver,
- 'newlib')
+ InstallNaClHeaders(GetToolchainNaClInclude('pnacl', pnacldir, 'x86'),
+ pepper_ver,
+ 'newlib')
def BuildStepCopyBuildHelpers(pepperdir, platform):
@@ -928,7 +922,7 @@ def main(args):
BuildStepCopyTextFiles(pepperdir, pepper_ver, clnumber)
BuildStepBuildToolchains(pepperdir, platform, pepper_ver, toolchains)
- InstallHeaders(os.path.join(pepperdir, 'include'), None, 'libs')
+ InstallCommonHeaders(os.path.join(pepperdir, 'include'))
BuildStepCopyBuildHelpers(pepperdir, platform)
BuildStepCopyExamples(pepperdir, toolchains, options.build_experimental, True)
diff --git a/native_client_sdk/src/libraries/ppapi_cpp/library.dsc b/native_client_sdk/src/libraries/ppapi_cpp/library.dsc
index eeccb0c..956f866 100644
--- a/native_client_sdk/src/libraries/ppapi_cpp/library.dsc
+++ b/native_client_sdk/src/libraries/ppapi_cpp/library.dsc
@@ -1,5 +1,5 @@
{
- 'TOOLS': ['win', 'linux'],
+ 'TOOLS': ['newlib', 'glibc', 'pnacl', 'win', 'linux'],
'SEARCH' : [
'../../../../ppapi/cpp',
'../../../../ppapi/utility',