The address of a reference, or the 'this' pointer, are always non-NULL
in well-defined C/C++ programs, and Clang warns about comparing them to NULL,
because the comparisons may be optimized away.
However, it can still be useful to do such comparisons in Debug builds.
For example, Skia does a lot of SkASSERT(&a), where a is a reference
parameter.
BUG=404271
Review URL: https://codereview.chromium.org/479293002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@290361 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
iOS 6 will no longer be supported.
Replaces deprecated sizeWithFont: with sizeWithAttributes: (adding a
ceilf since according to the internet, the former rounds up, and the
latter does not) to fix compilation.
Special-cases the nil font case, since sizeWithFont:nil would work
and return zero, but it's impossible to construct an attribute
dictionary with a nil font.
BUG=402921
Review URL: https://codereview.chromium.org/470923005
git-svn-id: http://src.chromium.org/svn/trunk/src/build@289702 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
iOS 6 will no longer be supported.
Replaces deprecated sizeWithFont: with sizeWithAttributes: (adding a
ceilf since according to the internet, the former rounds up, and the
latter does not) to fix compilation.
BUG=402921
Review URL: https://codereview.chromium.org/463333002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@289403 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Rather than registering all jni bindings at startup, only get references
to the class object for those files which require bindings. All others
are satisfied by exporting symbols which can be found automatically by
the VM.
BUG=402003
Review URL: https://codereview.chromium.org/454923002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@288685 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This is shorter, and it allows us to remove two trampoline files on Android
(which still weren't updated to trampoline to the 4.8 toolchain and still
referred to the 4.6 toolchain instead).
No intended visible behavior change.
BUG=none
Review URL: https://codereview.chromium.org/450843002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@288424 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
chrome/android still used system gcc as host compiler, and system gcc is
gcc 4.6 on Ubuntu Precise. This is too old.
Instead, use clang by default as host compiler (except when building for
AOSP, see http://crbug.com/377684 for that). This is controlled by a new
gyp variable host_clang, which only has an effect if clang=0. The existing
clang gyp variable means "use clang for everything"; if it's not set then
host_clang means "use clang for host compiles".
If your system gcc is 4.8+ and you don't want to use clang, you can set
host_clang=0 to use system gcc for host compiles instead.
In host_clang mode, our clang plugins currently aren't used (I figure if you
want plugins, you can just use clang=1). clang_warning_flags on the other
hand are used, to make sure the build stays warning-free.
BUG=360311
R=hans@chromium.org
Review URL: https://codereview.chromium.org/430383002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@287386 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
The recommended C++ library on iOS is libc++ but the compiler still default
to libstdc++ so add a new gyp variable "use_system_libcxx" to choose which
C++ library to use.
When building Chrome for iOS, so tool are still build on the host which
targets Mac OS X SDK 10.6 which does not supports libc++ so only enabled the
usage of libc++ when not building for the host.
The version of clang shipped on Google storage does not supports using the
system libc++ so instead use the version of clang shipped with Xcode when
using libc++.
BUG=366744
Review URL: https://codereview.chromium.org/425313002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@287321 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
In addition to disabling warnings, this does turn on a few warnings that weren't
on before (-Wheader-hygiene, -Wstring-conversions). I'll see how our bot copes,
if it's too horrible I might revert this again for a bit.
BUG=82385
NOTRY=true
Review URL: https://codereview.chromium.org/419963004
git-svn-id: http://src.chromium.org/svn/trunk/src/build@287237 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Previously, every gyp file that wanted to set clang warnings had to check
for clang==1 and then set cflags and xcode_settings.WARNING_CFLAGS. Factor
this out, so that targets only need to set clang_warning_flags for warnings
that apply to all platforms. (Per-platform flags still need to be set manually.)
This removes existing duplication from gyp files, and prevents adding more
duplication when trying to add the same warning flags for clang/win.
BUG=82385
R=hans@chromium.org, scottmg@chromium.org
TBR=various owners
Review URL: https://codereview.chromium.org/437543007
git-svn-id: http://src.chromium.org/svn/trunk/src/build@287092 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This, along with other changes described in crbug/367239, allows refactoring
of the build logic to allow per-target customization of the CLD data source.
This, in turn, allows chrome_shell to be built with statically-linked CLD even
if other things (such as the full browser) are not.
BUG=367239
TBR=toyoshim@chromium.org
Review URL: https://codereview.chromium.org/424123003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@286487 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Currently this relies on the user setting these variables
outside of gyp and outside of source control. Once this
lands the buildbot configs can be simplified to remove
these variables.
Even though we are trying to switch to clang by default
in the short term, this is still useful for building
with gcc on trusty (which has gcc 4.8), and allows us to
simplify the bot configs.
BUG=395832
R=thakis@chromium.org
Review URL: https://codereview.chromium.org/414343003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@286219 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
They were previously enabled in shared_library builds for historical reasons.
Turning them off makes things nice and consistent across all build types,
and helps the Windows Clang build, which currently doesn't support exceptions.
Previous attemps failed due to:
- mojo_public_environment_unittests unreachable code warning in
DrMemory shared_library Release builds (crbug.com/397465)
Fixed in Chromium r285674.
- chrome_elf_unittests on x64 (crbug.com/396244)
Fixed in Chromium r285377.
- blink_platform_unittests:DateTimeFormatTest.CommonPattern et al.
Fixed in Blink r176189
BUG=82385
TBR=thakis
Review URL: https://codereview.chromium.org/419973003
git-svn-id: http://src.chromium.org/svn/trunk/src/build@285676 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
BUG=397465
> Disable exceptions on Windows in all builds (take 3)
>
> They were previously enabled in shared_library builds for historical reasons.
>
> This change is relevant for Clang, which currently doesn't support exceptions
> on Windows.
>
> Previous attemps failed due to:
> - chrome_elf_unittests on x64 (crbug.com/396244)
> Fixed in Chromium r285377.
>
> - blink_platform_unittests:DateTimeFormatTest.CommonPattern et al.
> Fixed in Blink r176189
>
> BUG=82385
> TBR=thakis
>
> Review URL: https://codereview.chromium.org/420593002TBR=hans@chromium.org
Review URL: https://codereview.chromium.org/418393002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@285614 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
They were previously enabled in shared_library builds for historical reasons.
This change is relevant for Clang, which currently doesn't support exceptions
on Windows.
Previous attemps failed due to:
- chrome_elf_unittests on x64 (crbug.com/396244)
Fixed in Chromium r285377.
- blink_platform_unittests:DateTimeFormatTest.CommonPattern et al.
Fixed in Blink r176189
BUG=82385
TBR=thakis
Review URL: https://codereview.chromium.org/420593002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@285458 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This is necessary to allow building multiple targets with conflicting
requirements, such as chrome_shell (needing a statically-linked CLD2) at the
same time as the APK for Android (using, e.g., the "component" CLD2 data
source). For more information and background, refer to the linked bug.
This change should be a no-op in all current build configurations, but moves
closer to enabling the behavior described above.
BUG=367239
TBR=toyoshim
NOTRY=true
Review URL: https://codereview.chromium.org/416863002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@285289 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Broke Mac ASan Builder gclient runhooks step:
Error: Command /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/python src/build/gyp_chromium returned non-zero exit status 1 in /Volumes/data/b/build/slave/Mac_ASan_Builder/build
Updating projects from gyp files...
Using overrides found in /Users/chrome-bot/.gyp/include.gypi
gyp: Found /Volumes/data/b/build/slave/Mac_ASan_Builder/build/src/third_party/libc++/libc++.gyp:libcxx_proxy#target in dependencies! of /Volumes/data/b/build/slave/Mac_ASan_Builder/build/src/base/base.gyp:sanitizer_options#target, but not in dependencies
builder -> 'ninja'
gyp_defines -> {'asan': '1', 'gomadir': '/Volumes/data/b/build/goma', 'use_goma': '1', 'component': 'static_library', 'release_extra_cflags': '-gline-tables-only'}
IsWindows -> False
IsLinux -> False
platform -> 'mac'
Running build/landmines.py...
Hook '/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/python src/build/gyp_chromium' took 51.21 secs
> Use libc++ for all non-Windows ASan builds.
>
> BUG=318770
> TBR=earthdok@chromium.org
>
> Review URL: https://codereview.chromium.org/414703002TBR=glider@chromium.org
Review URL: https://codereview.chromium.org/410213002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@284932 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Reason for revert:
Speculative revert to try to fix chrome_elf_unittests on Win7 x64.
http://build.chromium.org/p/chromium.win/builders/Win%207%20Tests%20x64%20%282%29/builds/18370
AddDllsFromRegistryToBlacklist
LoadBlacklistedLibrary
I'll reland if that's not it.
Original issue's description:
> Disable exceptions on Windows also in the shared_library build
>
> They were previously only disabled in static_library builds. This is believed
> to have been due to problems with old MSVC versions, but it should work now.
>
> This change is relevant for Clang, which currently doesn't support exceptions
> on Windows.
>
> Last time I attempted to do this, it broke some tests due to a debug assertion.
> Gtest had previously been catching the exception, but with exceptions disabled
> it crashed. Those tests were actually broken in static_library Debug builds
> too, but we don't seem to have bots for that. After Blink r176189, we no longer
> hit that debug assertion, so the tests now pass.
>
> BUG=82385
> TEST=blink_platform_unittests --gtest_filter=DateTimeFormatTest.CommonPattern,
> content_browsertests --gtest_filter=RenderViewImplTest.SetEditableSelectionAndComposition
> webkit_unit_tests
>
> R=thakis@chromium.org
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=284519TBR=maruel@chromium.org,thakis@chromium.org,hans@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=82385
Review URL: https://codereview.chromium.org/410613002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@284626 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
They were previously only disabled in static_library builds. This is believed
to have been due to problems with old MSVC versions, but it should work now.
This change is relevant for Clang, which currently doesn't support exceptions
on Windows.
Last time I attempted to do this, it broke some tests due to a debug assertion.
Gtest had previously been catching the exception, but with exceptions disabled
it crashed. Those tests were actually broken in static_library Debug builds
too, but we don't seem to have bots for that. After Blink r176189, we no longer
hit that debug assertion, so the tests now pass.
BUG=82385
TEST=blink_platform_unittests --gtest_filter=DateTimeFormatTest.CommonPattern,
content_browsertests --gtest_filter=RenderViewImplTest.SetEditableSelectionAndComposition
webkit_unit_tests
R=thakis@chromium.org
Review URL: https://codereview.chromium.org/404853002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@284519 4ff67af0-8c30-449e-8e8b-ad334ec8d88c