Open Bug 966351 Opened 11 years ago Updated 2 years ago

Give a clear error message when running PGO on unsupported platforms

Categories

(Firefox Build System :: General, defect)

defect

Tracking

(Not tracked)

People

(Reporter: away, Unassigned)

Details

In [1] I attempted a try push with the PGO override and debug builds included.

I got errors on several platforms along the lines of: 
ld: duplicate symbol _main in leakstats.o and spacetrace.o for architecture x86_64

It wasn't clear to me at all that this resulted from requesting PGO on unsupported platforms. There should be a more clear error message for this, preferably early on.

(I didn't actually *care* getting about PGO on debug. I thought I would just get PGO where possible, and ignored elsewhere. But that's another story)

[1] https://tbpl.mozilla.org/?tree=Try&rev=5943d703531f
Seems to me we have two options here (both better than the status quo):

1) Error out during configure if attempting to PGO on a platform where it isn't supported.
2) Drop MOZ_PGO if it isn't supported, print some kind of message to that effect, and carry on with the build as normal.

In both of the above scenarios, we'd probably want some way to override in the event that somebody's trying to add PGO to a new platform or just likes living dangerously.
These fall into three categories:
1) PGO-on-debug
2) PGO-on-OS X-universal
3) PGO-on-Android

For the first two it's definitely fine to just error out in configure with "unsupported". For the third, it's possible we might make that build configuration work (by running under qemu or an emulator), but it's fine to make it error in configure for now and deal with it when we get there.
Product: Core → Firefox Build System
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.