Closed Bug 1036645 Opened 5 years ago Closed 5 years ago

The config.cache for subconfigures is blown away every time configure runs

Categories

(Firefox Build System :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla33

People

(Reporter: ehsan, Assigned: glandium)

References

Details

Attachments

(3 files, 2 obsolete files)

glandium tells me that the heuristic in bug 906403 is broken...
There are several issues in the script that checks config.cache:
- it doesn't unquote values, so it compares e.g. "'foo'" with "foo", seens the mismatch, and throws away the cache.
- it doesn't consider the combination of ac_cv_env_*_set and ac_cv_env_*_value vs. os.environ entirely properly
- it tries to match the *_alias variables with the environment, when what config.cache stores comes from the configure command line arguments.
Summary: The config.cache for subconfigures is blown away every time we touch configure without clobber → The config.cache for subconfigures is blown away every time configure runs
As ICU needs an objdir different from its source directory, add support for
that in AC_OUTPUT_SUBDIRS.
Attachment #8453551 - Flags: review?(gps)
Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED
I had forgotten to remove ICU_SRCDIR, which is now useless. Note it's safe to remove because AC_OUTPUT_SUBDIRS does the right thing already.
Attachment #8453552 - Flags: review?(gps)
Attachment #8453551 - Attachment is obsolete: true
Attachment #8453551 - Flags: review?(gps)
All subconfigures are essentially doing it already, so just inverse the process. That would also limit problems with additional subconfigures (all the recent ones had to come with their own config.cache)
Attachment #8453555 - Flags: review?(gps)
OS: Mac OS X → All
Hardware: x86 → All
Note that by not using AC_OUTPUT_SUBDIRS, ICU's configure was *not* using a config.cache, so this patch set changes that as well.
Turns out the freetype subconfigure was relying on using the main config.cache.
Attachment #8453560 - Flags: review?(gps)
Attachment #8453555 - Attachment is obsolete: true
Attachment #8453555 - Flags: review?(gps)
https://tbpl.mozilla.org/?tree=Try&rev=a1c98df7cb24 With the new part 2, only for android.
Attachment #8453552 - Flags: review?(gps) → review+
Attachment #8453560 - Flags: review?(gps) → review+
Comment on attachment 8453557 [details] [diff] [review]
part 3 - Fix the subconfigure wrapper heuristics to decide when to kill config.cache

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

::: build/subconfigure.py
@@ +65,5 @@
> +    parser = argparse.ArgumentParser()
> +    parser.add_argument('--target', type=str)
> +    parser.add_argument('--host', type=str)
> +    parser.add_argument('--build', type=str)
> +    args, others = parser.parse_known_args(args)

Wait, there is a parse_known_args()?! We could be using this for so many mach commands. Dammit.
Attachment #8453557 - Flags: review?(gps) → review+
Depends on: 1038590
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.