OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium 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 import("//build/config/features.gni") | 5 import("//build/config/features.gni") |
6 import("//build/config/nacl/config.gni") | 6 import("//build/config/nacl/config.gni") |
7 import("//build/toolchain/toolchain.gni") | 7 import("//build/toolchain/toolchain.gni") |
8 import("//ppapi/native_client/nacl_test_data.gni") | 8 import("//ppapi/native_client/nacl_test_data.gni") |
9 | 9 |
10 group("nacl") { | 10 group("nacl") { |
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
558 # Workaround against LLVM bug. | 558 # Workaround against LLVM bug. |
559 # In short, an LTO optimization pass might recognize | 559 # In short, an LTO optimization pass might recognize |
560 # naive implementations of builtins (such as memset) | 560 # naive implementations of builtins (such as memset) |
561 # and replace them with references to the real builtins, | 561 # and replace them with references to the real builtins, |
562 # which, in the case of -nostdlib, might cause the binary | 562 # which, in the case of -nostdlib, might cause the binary |
563 # to get undefined references to those symbols. | 563 # to get undefined references to those symbols. |
564 # | 564 # |
565 # See more details: | 565 # See more details: |
566 # https://llvm.org/bugs/show_bug.cgi?id=30403 | 566 # https://llvm.org/bugs/show_bug.cgi?id=30403 |
567 if (use_thin_lto) { | 567 if (use_thin_lto) { |
568 ldflags = [ "-Wl,--lto-O0" ] | 568 if (use_lld) { |
| 569 ldflags = [ "-Wl,--lto-O0" ] |
| 570 } else { |
| 571 ldflags = [ "-Wl,-plugin-opt,O0" ] |
| 572 } |
569 } | 573 } |
570 } | 574 } |
571 | 575 |
572 executable("nonsfi_libc_free_nexe") { | 576 executable("nonsfi_libc_free_nexe") { |
573 output_name = "libc_free_$arch" | 577 output_name = "libc_free_$arch" |
574 output_extension = "nexe" | 578 output_extension = "nexe" |
575 sources = [ | 579 sources = [ |
576 "nonsfi/libc_free.c", | 580 "nonsfi/libc_free.c", |
577 ] | 581 ] |
578 | 582 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 "nonsfi/libc_free.nmf", | 623 "nonsfi/libc_free.nmf", |
620 ] | 624 ] |
621 outputs = [ | 625 outputs = [ |
622 "${root_build_dir}/nacl_test_data/libc-free/{{source_file_part}}", | 626 "${root_build_dir}/nacl_test_data/libc-free/{{source_file_part}}", |
623 ] | 627 ] |
624 deps = [ | 628 deps = [ |
625 ":nonsfi_libc_free_nexe", | 629 ":nonsfi_libc_free_nexe", |
626 ] | 630 ] |
627 } | 631 } |
628 } | 632 } |
OLD | NEW |