Closed Bug 1832219 Opened 2 years ago Closed 2 years ago

Define _USE_MATH_DEFINES and M_PI on both regular and mingw Windows builds

Categories

(Firefox Build System :: General: Unsupported Platforms, defect)

defect

Tracking

(firefox115 fixed)

RESOLVED FIXED
115 Branch
Tracking Status
firefox115 --- fixed

People

(Reporter: cpeterson, Assigned: cpeterson)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Without _USE_MATH_DEFINES, Windows' math.h doesn't define M_PI.

_USE_MATH_DEFINES was defined for MSVC builds in bug 1228947, but it's also needed for mingw-clang builds on Try. (For some reason, mozilla-central's mingw-clang builds don't have this error, but Try builds do.)

obj-build/dist/include/mozilla/ServoStyleConstsInlines.h:396:32: error: use of undeclared identifier 'M_PI'
obj-build/dist/include/mozilla/StaticPrefList_apz.h:133:22: error: use of undeclared identifier 'M_PI'
obj-build/dist/include/mozilla/gfx/PathHelpers.h:139:33: error: use of undeclared identifier 'M_PI'

Without _USE_MATH_DEFINES, Windows' math.h doesn't define M_PI. Since _USE_MATH_DEFINES is defined globally, redundant definitions of _USE_MATH_DEFINES in moz.build files can be removed.

obj-build/dist/include/mozilla/ServoStyleConstsInlines.h:396:32: error: use of undeclared identifier 'M_PI'
obj-build/dist/include/mozilla/StaticPrefList_apz.h:133:22: error: use of undeclared identifier 'M_PI'
obj-build/dist/include/mozilla/gfx/PathHelpers.h:139:33: error: use of undeclared identifier 'M_PI'

Assignee: nobody → cpeterson
Status: NEW → ASSIGNED
Pushed by cpeterson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/41c57554a22d Define _USE_MATH_DEFINES and M_PI on both regular and mingw Windows builds. r=firefox-build-system-reviewers,cubeb-reviewers,glandium,padenot
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: