Closed Bug 1080968 Opened 10 years ago Closed 10 years ago

Add support for constexpr and explicit conversions on clang-cl

Categories

(Core :: MFBT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

Attachments

(1 file)

      No description provided.
Assignee: nobody → ehsan.akhgari
Blocks: winclang
Attachment #8502950 - Flags: review?(nfroyd)
Comment on attachment 8502950 [details] [diff] [review]
Add support for constexpr and explicit conversions on clang-cl

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

I guess clang-cl doesn't support the __attribute__ syntax for things, so we can't be clever here and just do something like:

#if defined(_MSC_VER) && !defined(__clang__) // native MSVC
...
#elif defined(__clang__) // clang or clang-cl on Windows
...
#elif defined(__GNUC__) // gcc
...
#endif

?  I guess that would shut out doing things with clang-cl's MSVC version emulation...
Attachment #8502950 - Flags: review?(nfroyd) → review+
I think it actually does support __attribute__, but I'd prefer to keep as much as of the logic shared with MSVC (since it's supposed to be a drop-in replacement and all.)
https://hg.mozilla.org/mozilla-central/rev/d27ce1e75719
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
In hindsight, the constexpr part of this was a stupid idea.  constexpr-ness of things can change ABI requirements, and I keep running into ABI miscompat issues when some object files are compiled with cl and some with clang-cl where the problem boils down to clang-cl choosing constexpr and MSVC 2013 not, and I'm tired of this!

I'm going to revert the constexpr part of this bug.  Sorry for being silly!
Depends on: 1277775
Depends on: 1120059
You need to log in before you can comment on or make changes to this bug.