gecko-dev/build/moz.configure/flags.configure
Emilio Cobos Álvarez 879d99e739 Bug 1513009 - Deny Rust warnings on automation. r=ted
Summary:
I've chosen linux64-debug since it's the most visible build I usually do, but I
could do another build task or something, or use the static analysis builds, or
what not. Just let me know if there's a better way to do this.

Caveat: This might make updating Rust toolchains a bit more painful. I think
this is better and we should just deal with warnings before updating toolchains,
but I don't know if there'd be strong opposition to that.

Note that this does _not_ affect third-party code since Cargo passes
`--cap-lint warn` automatically for those.

Proof that it works:

 * https://treeherder.mozilla.org/#/jobs?repo=try&revision=4ad1e4e1392f71b574cff683e90c7b13bf8781d1
 * https://treeherder.mozilla.org/#/jobs?repo=try&revision=57604f92624bbe49037eee87c56fdb6bf2b5017d

Reviewers: #firefox-build-system-reviewers, ted

Reviewed By: #firefox-build-system-reviewers, ted

Subscribers: reviewbot, glandium, ted

Bug #: 1513009

Differential Revision: https://phabricator.services.mozilla.com/D14083
2018-12-14 23:35:47 +01:00

27 lines
1.0 KiB
Python

# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# We support C++14, but we don't want to enable the sized deallocation
# facilities in C++14 yet.
check_and_add_gcc_flag('-fno-sized-deallocation', compiler=cxx_compiler)
# Please keep these last in this file.
add_old_configure_assignment('_COMPILATION_CFLAGS', compilation_flags.cflags)
add_old_configure_assignment(
'_COMPILATION_CXXFLAGS', compilation_flags.cxxflags)
add_old_configure_assignment(
'_COMPILATION_HOST_CFLAGS', compilation_flags.host_cflags)
add_old_configure_assignment(
'_COMPILATION_HOST_CXXFLAGS', compilation_flags.host_cxxflags)
@depends(rust_compile_flags, rust_warning_flags)
def rust_flags(compile_flags, warning_flags):
return compile_flags + warning_flags
set_config('MOZ_RUST_DEFAULT_FLAGS', rust_flags)