Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: build_tools/pnacl-configure-shim.py

Issue 1417223003: Switch from using 'nacl_main' to 'main' entry point (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build_tools/common.sh ('k') | ports/agg-demo/drawing.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2014 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2014 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 """Autoconf builds lots of small executables. 5 """Autoconf builds lots of small executables.
6 This wreaks havock with pnacl's slow -O2 build time. 6 This wreaks havock with pnacl's slow -O2 build time.
7 Additionally linking nacl_io + ppapi_simple slows things down even more. 7 Additionally linking nacl_io + ppapi_simple slows things down even more.
8 8
9 This script is injected for CC to speed up configure by: 9 This script is injected for CC to speed up configure by:
10 - When configuring: 10 - When configuring:
11 - Drop -O2 and -O3 11 - Drop -O2 and -O3
12 - Add -O0 12 - Add -O0
13 - Drop nacl_spawn + nacl_io + cli_main and their dependencies. 13 - Drop nacl_spawn + nacl_io + cli_main and their dependencies.
14 """ 14 """
15 15
16 import subprocess 16 import subprocess
17 import sys 17 import sys
18 18
19 cmd = sys.argv[1:] 19 cmd = sys.argv[1:]
20 configuring = 'conftest.c' in cmd or 'conftest.pexe' in cmd 20 configuring = 'conftest.c' in cmd or 'conftest.pexe' in cmd
21 21
22 DROP_FLAGS = { 22 DROP_FLAGS = {
23 '-O2', 23 '-O2',
24 '-O3', 24 '-O3',
25 '-Dmain=nacl_main',
26 '-Dmain=SDL_main', 25 '-Dmain=SDL_main',
27 '-lnacl_io', 26 '-lnacl_io',
28 '-lnacl_spawn', 27 '-lnacl_spawn',
29 '-lppapi_simple', 28 '-lppapi_simple',
30 '-lppapi_cpp', 29 '-lppapi_cpp',
31 '-lppapi', 30 '-lppapi',
32 '-lcli_main', 31 '-lcli_main',
33 '-lSDLmain', 32 '-lSDLmain',
34 } 33 }
35 34
36 if configuring: 35 if configuring:
37 cmd = [i for i in cmd if i not in DROP_FLAGS] 36 cmd = [i for i in cmd if i not in DROP_FLAGS]
38 cmd += ['-O0'] 37 cmd += ['-O0']
39 38
40 sys.exit(subprocess.call(cmd)) 39 sys.exit(subprocess.call(cmd))
OLDNEW
« no previous file with comments | « build_tools/common.sh ('k') | ports/agg-demo/drawing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698