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

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: . 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
« no previous file with comments | « build/config/sanitizers/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import("//build/config/sanitizers/sanitizers.gni")
6 7
7 config("mesa_headers_config") { 8 config("mesa_headers_config") {
8 include_dirs = [ "src/include" ] 9 include_dirs = [ "src/include" ]
9 if (!use_x11) { 10 if (!use_x11) {
10 defines = [ "MESA_EGL_NO_X11_HEADERS" ] 11 defines = [ "MESA_EGL_NO_X11_HEADERS" ]
11 } 12 }
12 } 13 }
13 14
14 # This directory contains checked-in files generated from the Mesa build. 15 # This directory contains checked-in files generated from the Mesa build.
15 generated_src_dir = "src/chromium_gensrc" 16 generated_src_dir = "src/chromium_gensrc"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 configs = [ ":mesa_internal_config" ] + previous_configs + [ 267 configs = [ ":mesa_internal_config" ] + previous_configs + [
267 ":mesa_internal_warnings", 268 ":mesa_internal_warnings",
268 ":mesa_libglslcommon_warnings", 269 ":mesa_libglslcommon_warnings",
269 ] 270 ]
270 271
271 if (is_clang) { 272 if (is_clang) {
272 # Mesa triggers some of these Clang warnings. 273 # Mesa triggers some of these Clang warnings.
273 configs -= [ "//build/config/clang:extra_warnings" ] 274 configs -= [ "//build/config/clang:extra_warnings" ]
274 } 275 }
275 276
277 # UBsan's vptr is not compatible with -fno-rtti,
278 # which is used by gallium/auxiliary/Makefile.
279 configs -= [ "//build/config/sanitizers:default_sanitizer_flags" ]
280 configs +=
281 [ "//build/config/sanitizers:default_sanitizer_flags_but_ubsan_vptr" ]
282
276 deps = [ 283 deps = [
277 ":mesa_headers", 284 ":mesa_headers",
278 ] 285 ]
279 } 286 }
280 287
281 static_library("mesa") { 288 static_library("mesa") {
282 sources = [ 289 sources = [
283 "$generated_src_dir/mesa/builtin_function.cpp", 290 "$generated_src_dir/mesa/builtin_function.cpp",
284 "$generated_src_dir/mesa/enums.c", 291 "$generated_src_dir/mesa/enums.c",
285 "$generated_src_dir/mesa/glapi_mapi_tmp_shared.h", 292 "$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 656 previous_configs = configs
650 configs = [] 657 configs = []
651 configs = [ ":mesa_internal_config" ] + previous_configs + 658 configs = [ ":mesa_internal_config" ] + previous_configs +
652 [ ":mesa_internal_warnings" ] 659 [ ":mesa_internal_warnings" ]
653 660
654 if (is_clang) { 661 if (is_clang) {
655 # Mesa triggers some of these Clang warnings. 662 # Mesa triggers some of these Clang warnings.
656 configs -= [ "//build/config/clang:extra_warnings" ] 663 configs -= [ "//build/config/clang:extra_warnings" ]
657 } 664 }
658 665
666 # UBsan's vptr is not compatible with -fno-rtti,
667 # which is used by gallium/auxiliary/Makefile.
668 configs -= [ "//build/config/sanitizers:default_sanitizer_flags" ]
669 configs +=
670 [ "//build/config/sanitizers:default_sanitizer_flags_but_ubsan_vptr" ]
671
659 cflags = [] 672 cflags = []
660 673
661 if (is_android && !is_clang) { 674 if (is_android && !is_clang) {
662 # Disable sincos() optimization to avoid a linker error 675 # Disable sincos() optimization to avoid a linker error
663 # since Android's math library doesn't have sincos(). 676 # since Android's math library doesn't have sincos().
664 # Either -fno-builtin-sin or -fno-builtin-cos works. 677 # Either -fno-builtin-sin or -fno-builtin-cos works.
665 cflags += [ "-fno-builtin-sin" ] 678 cflags += [ "-fno-builtin-sin" ]
666 } 679 }
667 680
668 if (is_win) { 681 if (is_win) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 configs = [ ":mesa_internal_config" ] + previous_configs + 716 configs = [ ":mesa_internal_config" ] + previous_configs +
704 [ ":mesa_internal_warnings" ] 717 [ ":mesa_internal_warnings" ]
705 718
706 include_dirs = [ "src/src/mesa/drivers" ] 719 include_dirs = [ "src/src/mesa/drivers" ]
707 720
708 if (is_clang) { 721 if (is_clang) {
709 # Mesa triggers some of these Clang warnings. 722 # Mesa triggers some of these Clang warnings.
710 configs -= [ "//build/config/clang:extra_warnings" ] 723 configs -= [ "//build/config/clang:extra_warnings" ]
711 } 724 }
712 725
726 # UBsan's vptr is not compatible with -fno-rtti,
727 # which is used by gallium/auxiliary/Makefile.
728 configs -= [ "//build/config/sanitizers:default_sanitizer_flags" ]
729 configs +=
730 [ "//build/config/sanitizers:default_sanitizer_flags_but_ubsan_vptr" ]
731
713 if (is_win) { 732 if (is_win) {
714 sources += [ "src/src/mesa/drivers/osmesa/osmesa.def" ] 733 sources += [ "src/src/mesa/drivers/osmesa/osmesa.def" ]
715 734
716 # http://crbug.com/512956 735 # http://crbug.com/512956
717 ldflags = [ "/ignore:4197" ] 736 ldflags = [ "/ignore:4197" ]
718 737
719 # TODO(brucedawson) : remove when crbug.com/482671 is resolved by 738 # TODO(brucedawson) : remove when crbug.com/482671 is resolved by
720 # Microsoft. 739 # Microsoft.
721 configs -= [ "//build/config/win:default_incremental_linking" ] 740 configs -= [ "//build/config/win:default_incremental_linking" ]
722 configs += [ "//build/config/win:no_incremental_linking" ] 741 configs += [ "//build/config/win:no_incremental_linking" ]
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 deps = [ 773 deps = [
755 "//third_party/wayland:wayland_util", 774 "//third_party/wayland:wayland_util",
756 ] 775 ]
757 776
758 configs -= [ "//build/config/compiler:chromium_code" ] 777 configs -= [ "//build/config/compiler:chromium_code" ]
759 configs += [ "//build/config/compiler:no_chromium_code" ] 778 configs += [ "//build/config/compiler:no_chromium_code" ]
760 779
761 public_configs = [ ":wayland_drm_protocol_config" ] 780 public_configs = [ ":wayland_drm_protocol_config" ]
762 } 781 }
763 } 782 }
OLDNEW
« no previous file with comments | « build/config/sanitizers/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698