• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1############################################################################
2# Copyright 2017 Intel Corporation
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#     http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15############################################################################
16# pylint: disable=locally-disabled, invalid-name, missing-docstring
17
18"""Intel win32 compiler configurations release
19"""
20from parts.config import ConfigValues, configuration
21
22def map_default_version(env):
23    return env['INTELC_VERSION']
24
25config = configuration(map_default_version)
26
27config.VersionRange("7-*",
28                    append=ConfigValues(
29                        CCFLAGS=[
30                            # Compile using multiple processes
31                            '/MP',
32                            # SDL: Stack-based Buffer Overrun Detection
33                            '/GS-',
34                            # minimize size
35                            '/O1',
36                            # allow non standart comment in C
37                            '/wd991',
38                            # typedef forward with the same name
39                            '/wd344',
40                            # disable language extensions
41                            '/Za',
42                            # Use multi-thread static libc
43                            '/MT',
44                            # treat all warnings as errors
45                            '/Wall',
46                            '/WX',
47                            '/nologo'],
48                        CXXFLAGS=[
49                            '/EHsc',
50                            # disable RTTI
51                            '/GR-'],
52                        LINKFLAGS=[
53                            # no default libraries
54                            '/NODEFAULTLIB',
55                            # prevent linker from references _main in dll
56                            '/NOENTRY',
57                            # elminiate unreferenced functions + data
58                            '/OPT:REF',
59                            # SDL: Data Execution Prevention
60                            '/NXCOMPAT',
61                            # SDL: Image Randomization
62                            '/DYNAMICBASE',
63                            # treat linker warnings as errors
64                            '/WX',
65                            '/nologo'
66                        ],
67                        CPPDEFINES=['NDEBUG']
68                    )
69                   )
70