| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f2b0098 commit f8d4577
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -59,6 +59,11 @@ parser.add_option('--prefix', | |||
| 59 | 59 | default='/usr/local', | |
| 60 | 60 | help='select the install prefix [default: %default]') | |
| 61 | 61 | ||
| 62 | + parser.add_option('--coverage', | ||
| 63 | + action='store_true', | ||
| 64 | + dest='coverage', | ||
| 65 | + help='Build node with code coverage enabled') | ||
| 66 | + | ||
| 62 | 67 | parser.add_option('--debug', | |
| 63 | 68 | action='store_true', | |
| 64 | 69 | dest='debug', | |
@@ -822,6 +827,11 @@ def configure_node(o): | |||
| 822 | 827 | if options.use_xcode and options.use_ninja: | |
| 823 | 828 | raise Exception('--xcode and --ninja cannot be used together.') | |
| 824 | 829 | ||
| 830 | + if options.coverage: | ||
| 831 | + o['variables']['coverage'] = 'true' | ||
| 832 | + else: | ||
| 833 | + o['variables']['coverage'] = 'false' | ||
| 834 | + | ||
| 825 | 835 | def configure_library(lib, output): | |
| 826 | 836 | shared_lib = 'shared_' + lib | |
| 827 | 837 | output['variables']['node_' + shared_lib] = b(getattr(options, shared_lib)) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -506,11 +506,22 @@ | |||
| 506 | 506 | 'NODE_PLATFORM="sunos"', | |
| 507 | 507 | ], | |
| 508 | 508 | }], | |
| 509 | - [ '(OS=="freebsd" or OS=="linux") and node_shared=="false"', { | ||
| 509 | + [ '(OS=="freebsd" or OS=="linux") and node_shared=="false" and coverage=="false"', { | ||
| 510 | 510 | 'ldflags': [ '-Wl,-z,noexecstack', | |
| 511 | 511 | '-Wl,--whole-archive <(V8_BASE)', | |
| 512 | 512 | '-Wl,--no-whole-archive' ] | |
| 513 | 513 | }], | |
| 514 | + [ '(OS=="freebsd" or OS=="linux") and node_shared=="false" and coverage=="true"', { | ||
| 515 | + 'ldflags': [ '-Wl,-z,noexecstack', | ||
| 516 | + '-Wl,--whole-archive <(V8_BASE)', | ||
| 517 | + '-Wl,--no-whole-archive', | ||
| 518 | + '--coverage', | ||
| 519 | + '-g', | ||
| 520 | + '-O0' ], | ||
| 521 | + 'cflags': [ '--coverage', | ||
| 522 | + '-g', | ||
| 523 | + '-O0' ] | ||
| 524 | + }], | ||
| 514 | 525 | [ 'OS=="sunos"', { | |
| 515 | 526 | 'ldflags': [ '-Wl,-M,/usr/lib/ld/map.noexstk' ], | |
| 516 | 527 | }], | |
| Back | FazBrowse Home | New Git URL |
0 commit comments