OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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/ui.gni") | 5 import("//build/config/ui.gni") |
6 | 6 |
7 config("mesa_headers_config") { | 7 config("mesa_headers_config") { |
8 include_dirs = [ "src/include" ] | 8 include_dirs = [ "src/include" ] |
9 if (use_x11) { | 9 if (use_x11) { |
10 defines = [ "MESA_EGL_NO_X11_HEADERS" ] | 10 defines = [ "MESA_EGL_NO_X11_HEADERS" ] |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 "src/src/mesa/x86-64/x86-64.c", | 612 "src/src/mesa/x86-64/x86-64.c", |
613 "src/src/mesa/x86-64/x86-64.h", | 613 "src/src/mesa/x86-64/x86-64.h", |
614 ] | 614 ] |
615 | 615 |
616 configs -= [ "//build/config/compiler:chromium_code" ] | 616 configs -= [ "//build/config/compiler:chromium_code" ] |
617 configs += [ "//build/config/compiler:no_chromium_code" ] | 617 configs += [ "//build/config/compiler:no_chromium_code" ] |
618 previous_configs = configs | 618 previous_configs = configs |
619 configs = [] | 619 configs = [] |
620 configs = [ ":mesa_internal_config" ] + previous_configs | 620 configs = [ ":mesa_internal_config" ] + previous_configs |
621 | 621 |
| 622 if (is_clang) { |
| 623 # Mesa triggers some of these Clang warnings. |
| 624 configs -= [ "//build/config/clang:extra_warnings" ] |
| 625 } |
| 626 |
622 cflags = [] | 627 cflags = [] |
623 | 628 |
624 if (is_clang) { | |
625 cflags += [ "-Wno-absolute-value" ] | |
626 } | |
627 | |
628 if (is_android && !is_clang) { | 629 if (is_android && !is_clang) { |
629 # Disable sincos() optimization to avoid a linker error | 630 # Disable sincos() optimization to avoid a linker error |
630 # since Android's math library doesn't have sincos(). | 631 # since Android's math library doesn't have sincos(). |
631 # Either -fno-builtin-sin or -fno-builtin-cos works. | 632 # Either -fno-builtin-sin or -fno-builtin-cos works. |
632 cflags += [ "-fno-builtin-sin" ] | 633 cflags += [ "-fno-builtin-sin" ] |
633 } | 634 } |
634 | 635 |
635 if (is_win) { | 636 if (is_win) { |
636 # Because we're building as a static library | 637 # Because we're building as a static library |
637 defines = [ "_GLAPI_NO_EXPORTS" ] | 638 defines = [ "_GLAPI_NO_EXPORTS" ] |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 if (is_win) { | 683 if (is_win) { |
683 defines = [ | 684 defines = [ |
684 "BUILD_GL32", | 685 "BUILD_GL32", |
685 "KEYWORD1=GLAPI", | 686 "KEYWORD1=GLAPI", |
686 "KEYWORD2=GLAPIENTRY", | 687 "KEYWORD2=GLAPIENTRY", |
687 ] | 688 ] |
688 } | 689 } |
689 } | 690 } |
690 } # !is_android | 691 } # !is_android |
691 # TODO(GYP) Android osmesa_in_lib_dir target. | 692 # TODO(GYP) Android osmesa_in_lib_dir target. |
OLD | NEW |