| OLD | NEW |
| 1 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 1 # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 { | 5 { |
| 6 'includes': [ | 6 'includes': [ |
| 7 '../../../../build/common.gypi', | 7 '../../../../build/common.gypi', |
| 8 ], | 8 ], |
| 9 'conditions': [ | 9 'conditions': [ |
| 10 ['target_arch=="x64"', { | 10 ['target_arch=="x64"', { |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 'type': 'static_library', | 59 'type': 'static_library', |
| 60 'product_dir': '<(SHARED_INTERMEDIATE_DIR)/nacl_bootstrap', | 60 'product_dir': '<(SHARED_INTERMEDIATE_DIR)/nacl_bootstrap', |
| 61 'hard_depencency': 1, | 61 'hard_depencency': 1, |
| 62 'include_dirs': [ | 62 'include_dirs': [ |
| 63 '..', | 63 '..', |
| 64 ], | 64 ], |
| 65 'sources': [ | 65 'sources': [ |
| 66 'nacl_bootstrap.c', | 66 'nacl_bootstrap.c', |
| 67 ], | 67 ], |
| 68 'cflags': [ | 68 'cflags': [ |
| 69 # Prevent llvm-opt from replacing my_bzero with a call |
| 70 # to memset. |
| 71 '-fno-builtin', |
| 69 # The tiny standalone bootstrap program is incompatible with | 72 # The tiny standalone bootstrap program is incompatible with |
| 70 # -fstack-protector, which might be on by default. That switch | 73 # -fstack-protector, which might be on by default. That switch |
| 71 # requires using the standard libc startup code, which we do not. | 74 # requires using the standard libc startup code, which we do not. |
| 72 '-fno-stack-protector', | 75 '-fno-stack-protector', |
| 73 # We don't want to compile it PIC (or its cousin PIE), because | 76 # We don't want to compile it PIC (or its cousin PIE), because |
| 74 # it goes at an absolute address anyway, and because any kind | 77 # it goes at an absolute address anyway, and because any kind |
| 75 # of PIC complicates life for the x86-32 assembly code. We | 78 # of PIC complicates life for the x86-32 assembly code. We |
| 76 # append -fno-* flags here instead of using a 'cflags!' stanza | 79 # append -fno-* flags here instead of using a 'cflags!' stanza |
| 77 # to remove -f* flags, just in case some system's compiler | 80 # to remove -f* flags, just in case some system's compiler |
| 78 # defaults to using PIC for everything. | 81 # defaults to using PIC for everything. |
| 79 '-fno-pic', '-fno-PIC', | 82 '-fno-pic', '-fno-PIC', |
| 80 '-fno-pie', '-fno-PIE', | 83 '-fno-pie', '-fno-PIE', |
| 81 ], | 84 ], |
| 82 'cflags!': [ | 85 'cflags!': [ |
| 83 # TODO(glider): -fasan is deprecated. | 86 # TODO(glider): -fasan is deprecated. |
| 84 '-fasan', | 87 '-fasan', |
| 85 '-faddress-sanitizer', | 88 '-faddress-sanitizer', |
| 86 '-w', | 89 '-w', |
| 87 # We filter these out because release_extra_cflags or another | 90 # We filter these out because release_extra_cflags or another |
| 88 # such thing might be adding them in, and those options wind up | 91 # such thing might be adding them in, and those options wind up |
| 89 # coming after the -fno-stack-protector we added above. | 92 # coming after the -fno-stack-protector we added above. |
| 90 '-fstack-protector', | 93 '-fstack-protector', |
| 91 '-fstack-protector-all', | 94 '-fstack-protector-all', |
| 92 '-fprofile-generate', | 95 '-fprofile-generate', |
| 93 '-finstrument-functions', | 96 '-finstrument-functions', |
| 94 ], | 97 ], |
| 95 'conditions': [ | 98 'conditions': [ |
| 96 ['clang==1', { | 99 ['clang==1', { |
| 97 'cflags': [ | 100 'cflags': [ |
| 98 # Prevent llvm-opt from replacing my_bzero with a call | |
| 99 # to memset | |
| 100 '-ffreestanding', | |
| 101 # But make its <limits.h> still work! | |
| 102 '-U__STDC_HOSTED__', '-D__STDC_HOSTED__=1', | |
| 103 # TODO(bbudge) Remove this when Clang supports -fno-pic. | 101 # TODO(bbudge) Remove this when Clang supports -fno-pic. |
| 104 '-Qunused-arguments', | 102 '-Qunused-arguments', |
| 105 ], | 103 ], |
| 106 }], | 104 }], |
| 107 ], | 105 ], |
| 108 }, | 106 }, |
| 109 { | 107 { |
| 110 'target_name': 'nacl_bootstrap_raw', | 108 'target_name': 'nacl_bootstrap_raw', |
| 111 'type': 'none', | 109 'type': 'none', |
| 112 # This magical flag tells Gyp that the dependencies of this target | 110 # This magical flag tells Gyp that the dependencies of this target |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 'inputs': ['nacl_bootstrap_munge_phdr.py', | 200 'inputs': ['nacl_bootstrap_munge_phdr.py', |
| 203 '<(PRODUCT_DIR)/nacl_bootstrap_munge_phdr', | 201 '<(PRODUCT_DIR)/nacl_bootstrap_munge_phdr', |
| 204 '<(PRODUCT_DIR)/nacl_bootstrap_raw'], | 202 '<(PRODUCT_DIR)/nacl_bootstrap_raw'], |
| 205 'outputs': ['<(PRODUCT_DIR)/nacl_helper_bootstrap'], | 203 'outputs': ['<(PRODUCT_DIR)/nacl_helper_bootstrap'], |
| 206 'message': 'Munging ELF program header', | 204 'message': 'Munging ELF program header', |
| 207 'action': ['python', '<@(_inputs)', '<@(_outputs)'] | 205 'action': ['python', '<@(_inputs)', '<@(_outputs)'] |
| 208 }], | 206 }], |
| 209 }, | 207 }, |
| 210 ], | 208 ], |
| 211 } | 209 } |
| OLD | NEW |