OLD | NEW |
---|---|
(Empty) | |
1 # Copyright (c) 2015 The Native Client Authors. All rights reserved. | |
Sam Clegg
2015/07/16 00:26:30
nit: drop the (c)
| |
2 # Use of this source code is governed by a BSD-style license that can be | |
3 # found in the LICENSE file. | |
4 | |
5 NACLPORTS_CPPFLAGS+=" -Dmain=nacl_main" | |
6 export LIBS="${NACL_CLI_MAIN_LIB}" | |
7 | |
8 ConfigureStep() { | |
9 EXTRA_CONFIGURE_ARGS+=" --disable-tool-name-check --disable-system-torrc" | |
10 | |
11 # TODO(dt) fix the problem in (explicit) static linking of openssl | |
12 # and libevent when TOOLCHAIN=glibc | |
13 if [ "${NACL_LIBC}" = "newlib" ]; then | |
14 EXTRA_CONFIGURE_ARGS+=" --enable-static-tor \ | |
15 --enable-static-libevent --with-libevent-dir=${NACL_PREFIX} \ | |
16 --enable-static-openssl --with-openssl-dir=${NACL_PREFIX} \ | |
17 --enable-static-zlib --with-zlib-dir=${NACL_PREFIX}" | |
18 NACLPORTS_CPPFLAGS+=" -I${NACLPORTS_INCLUDE}/glibc-compat" | |
19 export LIBS+=" -lglibc-compat" | |
20 fi | |
21 | |
22 # if unit test causes trouble (in pepper_canary) | |
23 # EXTRA_CONFIGURE_ARGS+ =" --disable-unittests" | |
24 | |
25 # libssp required | |
26 # TODO(dt) remove this flag once this issue is solved | |
27 EXTRA_CONFIGURE_ARGS+=" --disable-gcc-hardening" | |
Sam Clegg
2015/07/16 00:26:30
I would just set all this stuff at the global scop
| |
28 | |
29 DefaultConfigureStep | |
30 } | |
31 | |
32 SetOptFlags() { | |
33 #tor doesn't like NDEBUG, thus avoiding it for now | |
34 if IsCMakeProject; then | |
35 return | |
36 fi | |
37 | |
38 if [ "${NACL_DEBUG}" = "1" ]; then | |
39 NACLPORTS_CFLAGS+=" -g -O0" | |
40 NACLPORTS_CXXFLAGS+=" -g -O0" | |
41 else | |
42 # NACLPORTS_CFLAGS+=" -DNDEBUG -O2" | |
43 NACLPORTS_CFLAGS+=" -O2" | |
44 # NACLPORTS_CXXFLAGS+=" -DNDEBUG -O2" | |
45 NACLPORTS_CXXFLAGS+=" -O2" | |
46 if [ "${NACL_ARCH}" = "pnacl" ]; then | |
47 # NACLPORTS_LDFLAGS+=" -DNDEBUG -O2" | |
48 NACLPORTS_LDFLAGS+=" -O2" | |
49 fi | |
50 fi | |
51 } | |
52 | |
53 BuildStep() { | |
54 SetOptFlags | |
55 DefaultBuildStep | |
Sam Clegg
2015/07/16 00:26:30
Probably cleaner to do it removing the NDEBUG (see
| |
56 } | |
OLD | NEW |