Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: third_party/mesa/BUILD.gn

Issue 1917603002: third_party/mesa: turn off ubsan_vptr, since it's compiled without rtti. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ubsan_vptr_flags config Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 configs = [ ":mesa_internal_config" ] + previous_configs + [ 266 configs = [ ":mesa_internal_config" ] + previous_configs + [
267 ":mesa_internal_warnings", 267 ":mesa_internal_warnings",
268 ":mesa_libglslcommon_warnings", 268 ":mesa_libglslcommon_warnings",
269 ] 269 ]
270 270
271 if (is_clang) { 271 if (is_clang) {
272 # Mesa triggers some of these Clang warnings. 272 # Mesa triggers some of these Clang warnings.
273 configs -= [ "//build/config/clang:extra_warnings" ] 273 configs -= [ "//build/config/clang:extra_warnings" ]
274 } 274 }
275 275
276 if (is_ubsan_vptr) {
277 # UBsan's vptr is not compatible with -fno-rtti,
278 # which is used by gallium/auxiliary/Makefile.
279 configs -= [ "//build/config/sanitizers:ubsan_vptr_flags" ]
280 }
281
276 deps = [ 282 deps = [
277 ":mesa_headers", 283 ":mesa_headers",
278 ] 284 ]
279 } 285 }
280 286
281 static_library("mesa") { 287 static_library("mesa") {
282 sources = [ 288 sources = [
283 "$generated_src_dir/mesa/builtin_function.cpp", 289 "$generated_src_dir/mesa/builtin_function.cpp",
284 "$generated_src_dir/mesa/enums.c", 290 "$generated_src_dir/mesa/enums.c",
285 "$generated_src_dir/mesa/glapi_mapi_tmp_shared.h", 291 "$generated_src_dir/mesa/glapi_mapi_tmp_shared.h",
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 previous_configs = configs 655 previous_configs = configs
650 configs = [] 656 configs = []
651 configs = [ ":mesa_internal_config" ] + previous_configs + 657 configs = [ ":mesa_internal_config" ] + previous_configs +
652 [ ":mesa_internal_warnings" ] 658 [ ":mesa_internal_warnings" ]
653 659
654 if (is_clang) { 660 if (is_clang) {
655 # Mesa triggers some of these Clang warnings. 661 # Mesa triggers some of these Clang warnings.
656 configs -= [ "//build/config/clang:extra_warnings" ] 662 configs -= [ "//build/config/clang:extra_warnings" ]
657 } 663 }
658 664
665 if (is_ubsan_vptr) {
666 # UBsan's vptr is not compatible with -fno-rtti,
667 # which is used by gallium/auxiliary/Makefile.
668 configs -= [ "//build/config/sanitizers:ubsan_vptr_flags" ]
669 }
670
659 cflags = [] 671 cflags = []
660 672
661 if (is_android && !is_clang) { 673 if (is_android && !is_clang) {
662 # Disable sincos() optimization to avoid a linker error 674 # Disable sincos() optimization to avoid a linker error
663 # since Android's math library doesn't have sincos(). 675 # since Android's math library doesn't have sincos().
664 # Either -fno-builtin-sin or -fno-builtin-cos works. 676 # Either -fno-builtin-sin or -fno-builtin-cos works.
665 cflags += [ "-fno-builtin-sin" ] 677 cflags += [ "-fno-builtin-sin" ]
666 } 678 }
667 679
668 if (is_win) { 680 if (is_win) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 configs = [ ":mesa_internal_config" ] + previous_configs + 715 configs = [ ":mesa_internal_config" ] + previous_configs +
704 [ ":mesa_internal_warnings" ] 716 [ ":mesa_internal_warnings" ]
705 717
706 include_dirs = [ "src/src/mesa/drivers" ] 718 include_dirs = [ "src/src/mesa/drivers" ]
707 719
708 if (is_clang) { 720 if (is_clang) {
709 # Mesa triggers some of these Clang warnings. 721 # Mesa triggers some of these Clang warnings.
710 configs -= [ "//build/config/clang:extra_warnings" ] 722 configs -= [ "//build/config/clang:extra_warnings" ]
711 } 723 }
712 724
725 if (is_ubsan_vptr) {
726 # UBsan's vptr is not compatible with -fno-rtti,
727 # which is used by gallium/auxiliary/Makefile.
728 configs -= [ "//build/config/sanitizers:ubsan_vptr_flags" ]
729 }
730
713 if (is_win) { 731 if (is_win) {
714 sources += [ "src/src/mesa/drivers/osmesa/osmesa.def" ] 732 sources += [ "src/src/mesa/drivers/osmesa/osmesa.def" ]
715 733
716 # http://crbug.com/512956 734 # http://crbug.com/512956
717 ldflags = [ "/ignore:4197" ] 735 ldflags = [ "/ignore:4197" ]
718 736
719 # TODO(brucedawson) : remove when crbug.com/482671 is resolved by 737 # TODO(brucedawson) : remove when crbug.com/482671 is resolved by
720 # Microsoft. 738 # Microsoft.
721 configs -= [ "//build/config/win:default_incremental_linking" ] 739 configs -= [ "//build/config/win:default_incremental_linking" ]
722 configs += [ "//build/config/win:no_incremental_linking" ] 740 configs += [ "//build/config/win:no_incremental_linking" ]
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 deps = [ 772 deps = [
755 "//third_party/wayland:wayland_util", 773 "//third_party/wayland:wayland_util",
756 ] 774 ]
757 775
758 configs -= [ "//build/config/compiler:chromium_code" ] 776 configs -= [ "//build/config/compiler:chromium_code" ]
759 configs += [ "//build/config/compiler:no_chromium_code" ] 777 configs += [ "//build/config/compiler:no_chromium_code" ]
760 778
761 public_configs = [ ":wayland_drm_protocol_config" ] 779 public_configs = [ ":wayland_drm_protocol_config" ]
762 } 780 }
763 } 781 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698