Bug 89375 (X64_CONDITIONAL) - ConditionalMacros.h causes compiler errors for MSVC x64
Summary: ConditionalMacros.h causes compiler errors for MSVC x64
Status: RESOLVED FIXED
Alias: X64_CONDITIONAL
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 7
: P3 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-18 13:30 PDT by Alex Christensen
Modified: 2013-10-08 12:45 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2012-06-18 13:30:50 PDT
When compiling JavaScriptCore with MSVC for a x64 target, there are many errors caused by the lack of definitions from WebKitLibraries\win\include\ConditionalMacros.h.  Line 1054 of this file currently reads as follows:

    #elif defined(_M_IX86) /* Visual Studio with Intel x86 target */

Replacing it with the following causes many macros to be defined (perhaps not correctly), but it compiles.

    #elif defined(_M_IX86) || defined(_M_AMD64)  /* Visual Studio with Intel x86 or x64 target */

Should this be changed?  Is this the change that should be made?  It's not in the repository, so it can't be patched.
Comment 1 Patrick R. Gansterer 2012-08-06 15:00:15 PDT
similar like in https://bugs.webkit.org/show_bug.cgi?id=89374#c1
Comment 2 Alex Christensen 2013-05-02 21:34:08 PDT
This was fixed in Brent Fulgham's WinCairoRequirements git repository (https://github.com/bfulgham/WinCairoRequirements/blob/master/src/opencflite/include/ConditionalMacros.h lines 1103-1145) but I'm not sure I like this line (1106):

#define TARGET_CPU_X86 1

shouldn't we add a macro like this, which was not originally intended when OpenCFLite was written?

#define TARGET_CPU_X64    0
#define TARGET_CPU_X86_64 1