Closed Bug 716544 Opened 14 years ago Closed 13 years ago

Use --enable-warnings-as-errors for Android builds

Categories

(Firefox Build System :: General, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla14

People

(Reporter: mounir, Assigned: glandium)

References

Details

Attachments

(6 files, 3 obsolete files)

Glandium said we could try to do this by ignoring the warnings that pop (or not fail on it at least).
I said we could try to ignore warnings in system headers (which is what the bulk of warnings comes from).
So, in fact, system headers are normally ignored by default. But we don't include android headers as system headers.
Attached patch PoC (obsolete) — Splinter Review
Something like this should work. I leave it to you to do the same in js/src and maybe nsprpub. There may be some tweeks in security/manager too. (Note this patch removes the include from CFLAGS and CXXFLAGS because in practice, having it in CPPFLAGS will put it on all command lines where CFLAGS and CXXFLAGS are used)
Attachment #587004 - Attachment is obsolete: true
Attachment #587004 - Attachment is patch: true
Assignee: nobody → mh+mozilla
https://hg.mozilla.org/integration/mozilla-inbound/rev/14f43a9a1ecf This should stay open until we actually enable warnings as errors. This landing reduces the number of warnings significantly.
Whiteboard: [leave open after inbound merge]
Whiteboard: [leave open after inbound merge]
This applies on top of bug 730968. I verified this doesn't break b2g, besides two things I'll attach separately. This also fixes building mobile with the arm-eabi toolchain (instead of arm-linux-androideabi).
Attachment #602832 - Flags: review?(khuey)
stlport's assert.h #error's out when assert is already defined. I don't know why this doesn't happen unless building b2g with the patches from this bug applied, but since logging.h is fiddling with assert.h functionality, it's safer to include assert.h before doing so, to avoid anything included after logging.h pulling it and triggering the #error. Some other header also defines ERROR, which clashes with the definition from logging.h.
Attachment #602833 - Flags: review?(jones.chris.g)
Attachment #602833 - Flags: review?(jones.chris.g) → review+
Attachment #603179 - Flags: review?(khuey)
Comment on attachment 603177 [details] [diff] [review] Fix comparison between signed and unsigned integer expressions in nsStringAPI.h r=dbaron
Attachment #603177 - Flags: review?(dbaron) → review+
So the fundamental problem is that we're not building breakpad as upstream does. Upstream has a single makefile that does everyting, while we have a Makefile in many subdirectories src/common. That makes us effectively -Isrc/common and possibly include memory.h from there when system headers include it, while this is not intended. As a matter of fact, upstream only does -Isrc, and memory.h is included with "common/memory.h" when it needs to be included.
Attachment #603705 - Flags: review?(ted.mielczarek)
Attachment #602834 - Attachment is obsolete: true
Blocks: 734050
Comment on attachment 603705 [details] [diff] [review] Avoid unexpectedly including toolkit/crashreporter/google-breakpad/src/common/memory.h Review of attachment 603705 [details] [diff] [review]: ----------------------------------------------------------------- Thanks. I should probably rework these hand-crafted Breakpad Makefiles, they're kind of crappy.
Attachment #603705 - Flags: review?(ted.mielczarek) → review+
$(DIST)/include is needed for stl wrappers including mozilla/mozalloc.h
Attachment #605361 - Flags: review?(ted.mielczarek)
Attachment #603705 - Attachment is obsolete: true
Attachment #605361 - Flags: review?(ted.mielczarek) → review+
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: