Closed Bug 1245422 Opened 5 years ago Closed 5 years ago

Cleanup some crufty C*FLAGS on Windows

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox47 fixed)

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(3 files, 1 obsolete file)

No description provided.
The flag is used to create .sbr files, which bscmake subsequently uses to
create .bsc files. These files and related tools are, aiui, the ancestors
of Intellisense.

The -FR C*FLAGS are added to the build if MOZ_BROWSE_INFO or MOZ_BSCFILE
are set in the recursive make backend. While the former has an AC_SUBST,
the latter does not, so in practice, only the former can be set by
supported methods, and would need to be set in a mozconfig. At that
rate, people who do want those flags can add them in the C*FLAGS on
their own.

Developers are probably better served by the VisualStudio backend
anyways.
Attachment #8715214 - Flags: review?(mshal)
-DNDEBUG is already set through MOZ_DEBUG_DEFINES, and -UDEBUG is not
doing anything useful, since nothing is setting DEBUG on the command
line, nor does the compiler by default.
Attachment #8715215 - Flags: review?(mshal)
-Zi is already set through MOZ_DEBUG_FLAGS.
Attachment #8715216 - Flags: review?(mshal)
Comment on attachment 8715214 [details] [diff] [review]
Remove the -FR C*FLAGS on Windows builds

Can we kill the MOZ_BROWSE_INFO subst in configure.in & js/src/configure.in now? It doesn't appear to be used anywhere else.
Attachment #8715214 - Flags: review?(mshal) → review+
Attachment #8715215 - Flags: review?(mshal) → review+
Comment on attachment 8715216 [details] [diff] [review]
Remove -Zi from MOZ_OPTIMIZE_FLAGS when building with DMD enabled on Windows

>-Zi is already set through MOZ_DEBUG_FLAGS.

> ifdef MOZ_DMD
>-MOZ_OPTIMIZE_FLAGS=-Zi -Od
>+MOZ_OPTIMIZE_FLAGS=-Od

Can you clarify how -Zi being in MOZ_DEBUG_FLAGS means we can remove it here? It looks like MOZ_DEBUG_FLAGS only get used if either MOZ_DEBUG or MOZ_DEBUG_SYMBOLS is set. The 'ifdef MOZ_DMD' is inside the 'ifndef MOZ_DEBUG' block, and I don't see how MOZ_DMD implies MOZ_DEBUG_SYMBOLS. IOW: Is it possible to have MOZ_DEBUG and MOZ_DEBUG_SYMBOLS be false and MOZ_DMD true? If so I don't see how we get -Zi now.
Attachment #8715216 - Flags: review?(mshal) → feedback+
(In reply to Michael Shal [:mshal] from comment #5)
> IOW: Is it possible to have MOZ_DEBUG and MOZ_DEBUG_SYMBOLS be false and
> MOZ_DMD true? If so I don't see how we get -Zi now.

MOZ_DEBUG_SYMBOLS is always true, except if you explicitly disable it with a configure argument (which we don't in any standard configuration). And in fact, we also don't build DMD on non-debug builds, so this code path is never exercised in practice. Which makes the reason for the -Od dubious, since debug builds are now optimized, and we're fine with DMD being enabled without disabling optimizations. Nick, what do you think? I'd say we can plain remove that MOZ_OPTIMIZE_FLAGS line related to MOZ_DMD in config/config.mk. Do you agree?
Flags: needinfo?(n.nethercote)
I'm not 100% certain, but it sounds plausible, and I'm happy for you to try it.
Flags: needinfo?(n.nethercote)
Attachment #8715216 - Attachment is obsolete: true
Attachment #8715522 - Flags: review?(n.nethercote)
Comment on attachment 8715522 [details] [diff] [review]
Remove MOZ_OPTIMIZE_FLAGS override when building with DMD enabled on Windows

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

Thank you for the detailed log message.
Attachment #8715522 - Flags: review?(n.nethercote) → review+
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.