Closed Bug 1563158 Opened 5 years ago Closed 5 years ago

'--enable-replace-malloc' implied by 'imply_option at...' conflicts with '--disable-replace-malloc' from ...

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox70 fixed)

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Adding the following to build/moz.configure/memory.configure:

@depends(milestone, target, replace_malloc_default, '--enable-replace-malloc', when='--enable-jemalloc')
def phc_default(milestone, target, replace_malloc_default, replace_malloc):
    if not replace_malloc_default or (
               replace_malloc.origin != 'default' and not replace_malloc):
        return False
    if not milestone.is_nightly:
        return False
    return (target.os == 'GNU' and target.kernel == 'Linux' and \
            target.bitness == 64)


option('--enable-phc', env='MOZ_PHC', default=phc_default,
       when='--enable-jemalloc',
       help='{Enable|Disable} PHC (probabilistic dynamic memory checker). '
            'Also enables jemalloc, replace-malloc and profiling')
imply_option('--enable-replace-malloc', True, when='--enable-phc')
imply_option('--enable-profiling', True, when='--enable-phc')


set_config('MOZ_PHC', True, when='--enable-phc')

And running mach configure --disable-replace-malloc fails with

'--enable-replace-malloc' implied by 'imply_option at...' conflicts with '--disable-replace-malloc' from the command-line

... and it really shouldn't because phc_default is correctly False in that case. I think the only problem is that when is not taken into account here.

This is an extension of the relaxation added in bug 1529799.

Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/83a66863401b
Properly handle imply_option dependency loops when `when` is involved. r=chmanchester
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: