Versioning.
[WebKit-https.git] / Source / WebKit2 / Configurations / CompilerVersion.xcconfig
1 // Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved.
2 //
3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions
5 // are met:
6 // 1. Redistributions of source code must retain the above copyright
7 //    notice, this list of conditions and the following disclaimer.
8 // 2. Redistributions in binary form must reproduce the above copyright
9 //    notice, this list of conditions and the following disclaimer in the
10 //    documentation and/or other materials provided with the distribution.
11 //
12 // THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
13 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15 // PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
16 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
17 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
18 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
19 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
20 // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
23
24 IS_XCODE_0400 = $(IS_XCODE_0400_$(XCODE_VERSION_MINOR));
25 IS_XCODE_0400_0400 = YES;
26
27 IS_XCODE_0400_OR_0410 = $(IS_XCODE_0400_OR_0410_$(XCODE_VERSION_MINOR));
28 IS_XCODE_0400_OR_0410_0400 = YES;
29 IS_XCODE_0400_OR_0410_0410 = YES;
30
31 // The version of the LLVM Compiler in Xcode 4.0 and earlier have difficulty compiling our code.
32 LLVM_COMPILER_UNSUITABLE_FOR_DEBUG_BUILDS = $(LLVM_COMPILER_UNSUITABLE_FOR_DEBUG_BUILDS_$(XCODE_VERSION_MAJOR));
33 LLVM_COMPILER_UNSUITABLE_FOR_DEBUG_BUILDS_0300 = YES;
34 LLVM_COMPILER_UNSUITABLE_FOR_DEBUG_BUILDS_0400 = $(LLVM_COMPILER_UNSUITABLE_FOR_DEBUG_BUILDS_IS_XCODE_0400_$(IS_XCODE_0400));
35 LLVM_COMPILER_UNSUITABLE_FOR_DEBUG_BUILDS_IS_XCODE_0400_YES = YES;
36
37 // The version of the LLVM Compiler in Xcode 4.1 and earlier do not generate fast enough code.
38 LLVM_COMPILER_UNSUITABLE_FOR_OPTIMIZED_BUILDS = $(LLVM_COMPILER_UNSUITABLE_FOR_OPTIMIZED_BUILDS_$(XCODE_VERSION_MAJOR));
39 LLVM_COMPILER_UNSUITABLE_FOR_OPTIMIZED_BUILDS_0300 = YES;
40 LLVM_COMPILER_UNSUITABLE_FOR_OPTIMIZED_BUILDS_0400 = $(LLVM_COMPILER_UNSUITABLE_FOR_OPTIMIZED_BUILDS_IS_XCODE_0400_OR_0410_$(IS_XCODE_0400_OR_0410));
41 LLVM_COMPILER_UNSUITABLE_FOR_OPTIMIZED_BUILDS_IS_XCODE_0400_OR_0410_YES = YES;
42
43 LLVM_COMPILER_SUITABLE_FOR_DEBUG_BUILDS = $(LLVM_COMPILER_SUITABLE_FOR_DEBUG_BUILDS_$(LLVM_COMPILER_UNSUITABLE_FOR_DEBUG_BUILDS));
44 LLVM_COMPILER_SUITABLE_FOR_DEBUG_BUILDS_ = YES;
45 LLVM_COMPILER_SUITABLE_FOR_DEBUG_BUILDS_YES = NO;
46
47 LLVM_COMPILER_SUITABLE_FOR_OPTIMIZED_BUILDS = $(LLVM_COMPILER_SUITABLE_FOR_OPTIMIZED_BUILDS_$(LLVM_COMPILER_UNSUITABLE_FOR_OPTIMIZED_BUILDS));
48 LLVM_COMPILER_SUITABLE_FOR_OPTIMIZED_BUILDS_ = YES;
49 LLVM_COMPILER_SUITABLE_FOR_OPTIMIZED_BUILDS_YES = NO;
50
51
52 // Use GCC 4.2 with Xcode 3.1, which includes GCC 4.2 but defaults to GCC 4.0.
53 // Note that Xcode versions as new as 3.1.2 use XCODE_VERSION_ACTUAL for the minor version
54 // number.  Newer versions of Xcode use XCODE_VERSION_MINOR for the minor version, and
55 // XCODE_VERSION_ACTUAL for the full version number.
56 TARGET_GCC_VERSION = $(TARGET_GCC_VERSION_$(REAL_PLATFORM_NAME));
57 TARGET_GCC_VERSION_iphoneos = LLVM_GCC_42;
58 TARGET_GCC_VERSION_iphonesimulator = GCC_42;
59 TARGET_GCC_VERSION_macosx = $(TARGET_GCC_VERSION_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR));
60
61 TARGET_GCC_VERSION_macosx_1050 = $(TARGET_GCC_VERSION_macosx_1050_$(XCODE_VERSION_MINOR));
62 TARGET_GCC_VERSION_macosx_1050_ = $(TARGET_GCC_VERSION_macosx_1050_$(XCODE_VERSION_ACTUAL));
63 TARGET_GCC_VERSION_macosx_1050_0310 = GCC_42;
64 TARGET_GCC_VERSION_macosx_1050_0320 = GCC_42;
65
66 TARGET_GCC_VERSION_macosx_1060 = $(TARGET_GCC_VERSION_macosx_1060_AND_1070_$(CONFIGURATION));
67 TARGET_GCC_VERSION_macosx_1070 = $(TARGET_GCC_VERSION_macosx_1060_AND_1070_$(CONFIGURATION));
68 TARGET_GCC_VERSION_macosx_1060_AND_1070_Debug = $(TARGET_GCC_VERSION_macosx_USE_LLVM_COMPILER_$(LLVM_COMPILER_SUITABLE_FOR_DEBUG_BUILDS));
69 TARGET_GCC_VERSION_macosx_1060_AND_1070_Release = $(TARGET_GCC_VERSION_macosx_USE_LLVM_COMPILER_$(LLVM_COMPILER_SUITABLE_FOR_OPTIMIZED_BUILDS));
70 TARGET_GCC_VERSION_macosx_1060_AND_1070_Production = $(TARGET_GCC_VERSION_macosx_USE_LLVM_COMPILER_$(LLVM_COMPILER_SUITABLE_FOR_OPTIMIZED_BUILDS));
71 TARGET_GCC_VERSION_macosx_1060_NON_LLVM_FALLBACK = GCC_42;
72 TARGET_GCC_VERSION_macosx_1070_NON_LLVM_FALLBACK = LLVM_GCC_42;
73
74 TARGET_GCC_VERSION_macosx_USE_LLVM_COMPILER_YES = LLVM_COMPILER;
75 TARGET_GCC_VERSION_macosx_USE_LLVM_COMPILER_NO = $(TARGET_GCC_VERSION_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR)_NON_LLVM_FALLBACK);
76
77 TARGET_GCC_VERSION_macosx_1080 = LLVM_COMPILER;
78 TARGET_GCC_VERSION_macosx_1090 = LLVM_COMPILER;
79
80 GCC_VERSION = $(GCC_VERSION_$(TARGET_GCC_VERSION));
81 GCC_VERSION_GCC_40 = 4.0;
82 GCC_VERSION_GCC_42 = 4.2;
83 GCC_VERSION_LLVM_GCC_42 = com.apple.compilers.llvmgcc42;
84 GCC_VERSION_LLVM_COMPILER = com.apple.compilers.llvm.clang.1_0;