Closed Bug 894763 Opened 6 years ago Closed 6 years ago

objdir should reflect target, not host

Categories

(Firefox Build System :: General, defect)

ARM
Android
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla25

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(1 file)

The default objdir when building e.g. for android is derived from config.guess, which returned value depends on the host system, not the target.

It should instead reflect the target.
Depends on: 894776
This overrides client.mk's CONFIG_GUESS with the value from the --target configure option, and uses the same kind of logic for mach.
Attachment #776928 - Flags: review?(gps)
Comment on attachment 776928 [details] [diff] [review]
Default objdir should reflect target, not host

Review of attachment 776928 [details] [diff] [review]:
-----------------------------------------------------------------

I don't grok why the 2nd change in mozconfig2client-mk is needed. But I trust you know what you are doing.

::: build/autoconf/mozconfig2client-mk
@@ +36,5 @@
> +  APP=$1
> +  shift;
> +  if [ "$APP" = "$MOZ_BUILD_APP" ]; then
> +      ac_add_options "$*";
> +  fi

I don't understand why this was needed. Can you explain?

::: python/mozbuild/mozbuild/base.py
@@ +284,5 @@
>      def _config_guess(self):
>          if self._config_guess_output is None:
> +            make_extra = dict(m.split('=', 1) for m in self.mozconfig['make_extra'])
> +            if 'CONFIG_GUESS' in make_extra:
> +                self._config_guess_output = make_extra['CONFIG_GUESS']

self._config_guess_output = make_extra.get('CONFIG_GUESS', None)
Attachment #776928 - Flags: review?(gps) → review+
(In reply to Gregory Szorc [:gps] from comment #2)
> Comment on attachment 776928 [details] [diff] [review]
> Default objdir should reflect target, not host
> 
> Review of attachment 776928 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> I don't grok why the 2nd change in mozconfig2client-mk is needed. But I
> trust you know what you are doing.
> 
> ::: build/autoconf/mozconfig2client-mk
> @@ +36,5 @@
> > +  APP=$1
> > +  shift;
> > +  if [ "$APP" = "$MOZ_BUILD_APP" ]; then
> > +      ac_add_options "$*";
> > +  fi
> 
> I don't understand why this was needed. Can you explain?

Since ac_add_options is made non-empty, this makes ac_add_app_options do the same as what it does in mozconfig2configure. That being said, it's probably a bad idea because for setups like universal builds, we'd end up with two CONFIG_GUESS values, none of which we actually want to use.
Depends on: 897045
https://hg.mozilla.org/mozilla-central/rev/dbf147bd0c67
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.