aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/jcf-dump.c
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2015-07-10 13:56:48 +0200
committerUros Bizjak <uros@gcc.gnu.org>2015-07-10 13:56:48 +0200
commitd7cb4840b72b7ce93b2419fd4780b069ef1a8440 (patch)
treefc16d787905bcfdd06f06a135effd71c3654e227 /gcc/java/jcf-dump.c
parentd26fc9797bd7888d50fb8d09fbe7d258b0236444 (diff)
downloadgcc-d7cb4840b72b7ce93b2419fd4780b069ef1a8440.zip
gcc-d7cb4840b72b7ce93b2419fd4780b069ef1a8440.tar.gz
gcc-d7cb4840b72b7ce93b2419fd4780b069ef1a8440.tar.bz2
re PR target/66813 (gcc.target/i386/asm-flag-5.c failed with -march=pentium)
PR target/66813 * config/i386/i386.c (ix86_md_asm_adjust): Emit movstrictqi sequence for TARGET_ZERO_EXTEND_WITH_AND targets. testsuite/ChangeLog: PR target/66813 * gcc.target/i386/pr66813.c: New test. From-SVN: r225662
Diffstat (limited to 'gcc/java/jcf-dump.c')
0 files changed, 0 insertions, 0 deletions
/option> Unnamed repository; edit this file 'description' to name the repository.root
aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/objcpp.py
blob: de968be4295453d58c2b5a7c1e360802cf33621a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# SPDX-License-Identifier: Apache-2.0
# Copyright 2012-2017 The Meson development team

from __future__ import annotations

import typing as T

from ..options import OptionKey, UserStdOption

from .cpp import ALL_STDS
from .compilers import Compiler
from .mixins.apple import AppleCPPStdsMixin
from .mixins.gnu import GnuCompiler, GnuCPPStds, gnu_common_warning_args, gnu_objc_warning_args
from .mixins.clang import ClangCompiler, ClangCPPStds
from .mixins.clike import CLikeCompiler

if T.TYPE_CHECKING:
    from .. import coredata
    from ..envconfig import MachineInfo
    from ..environment import Environment
    from ..linkers.linkers import DynamicLinker
    from ..mesonlib import MachineChoice


class ObjCPPCompiler(CLikeCompiler, Compiler):

    language = 'objcpp'

    def __init__(self, ccache: T.List[str], exelist: T.List[str], version: str, for_machine: MachineChoice,
                 is_cross: bool, info: 'MachineInfo',
                 linker: T.Optional['DynamicLinker'] = None,
                 full_version: T.Optional[str] = None):
        Compiler.__init__(self, ccache, exelist, version, for_machine, info,
                          is_cross=is_cross, full_version=full_version,
                          linker=linker)
        CLikeCompiler.__init__(self)

    @staticmethod
    def get_display_language() -> str:
        return 'Objective-C++'

    def sanity_check(self, work_dir: str, environment: 'Environment') -> None:
        code = '#import<stdio.h>\nclass MyClass;int main(void) { return 0; }\n'
        return self._sanity_check_impl(work_dir, environment, 'sanitycheckobjcpp.mm', code)

    def form_compileropt_key(self, basename: str) -> OptionKey:
        if basename == 'std':
            return OptionKey(f'cpp_{basename}', machine=self.for_machine)
        return super().form_compileropt_key(basename)

    def get_options(self) -> coredata.MutableKeyedOptionDictType:
        opts = super().get_options()
        key = self.form_compileropt_key('std')
        opts.update({
            key: UserStdOption('cpp', ALL_STDS),
        })
        return opts


class GnuObjCPPCompiler(GnuCPPStds, GnuCompiler, ObjCPPCompiler):
    def __init__(self, ccache: T.List[str], exelist: T.List[str], version: str, for_machine: MachineChoice,
                 is_cross: bool, info: 'MachineInfo',
                 defines: T.Optional[T.Dict[str, str]] = None,
                 linker: T.Optional['DynamicLinker'] = None,
                 full_version: T.Optional[str] = None):
        ObjCPPCompiler.__init__(self, ccache, exelist, version, for_machine, is_cross,
                                info, linker=linker, full_version=full_version)
        GnuCompiler.__init__(self, defines)
        default_warn_args = ['-Wall', '-Winvalid-pch']
        self.warn_args = {'0': [],
                          '1': default_warn_args,
                          '2': default_warn_args + ['-Wextra'],
                          '3': default_warn_args + ['-Wextra', '-Wpedantic'],
                          'everything': (default_warn_args + ['-Wextra', '-Wpedantic'] +
                                         self.supported_warn_args(gnu_common_warning_args) +
                                         self.supported_warn_args(gnu_objc_warning_args))}

    def get_option_compile_args(self, options: 'coredata.KeyedOptionDictType') -> T.List[str]:
        args = []
        std = options.get_value(self.form_compileropt_key('std'))
        if std != 'none':
            args.append('-std=' + std)
        return args


class ClangObjCPPCompiler(ClangCPPStds, ClangCompiler, ObjCPPCompiler):

    def __init__(self, ccache: T.List[str], exelist: T.List[str], version: str, for_machine: MachineChoice,
                 is_cross: bool, info: 'MachineInfo',
                 defines: T.Optional[T.Dict[str, str]] = None,
                 linker: T.Optional['DynamicLinker'] = None,
                 full_version: T.Optional[str] = None):
        ObjCPPCompiler.__init__(self, ccache, exelist, version, for_machine, is_cross,
                                info, linker=linker, full_version=full_version)
        ClangCompiler.__init__(self, defines)
        default_warn_args = ['-Wall', '-Winvalid-pch']
        self.warn_args = {'0': [],
                          '1': default_warn_args,
                          '2': default_warn_args + ['-Wextra'],
                          '3': default_warn_args + ['-Wextra', '-Wpedantic'],
                          'everything': ['-Weverything']}

    def get_option_compile_args(self, options: 'coredata.KeyedOptionDictType') -> T.List[str]:
        args = []
        std = options.get_value(self.form_compileropt_key('std'))
        if std != 'none':
            args.append('-std=' + std)
        return args


class AppleClangObjCPPCompiler(AppleCPPStdsMixin, ClangObjCPPCompiler):

    """Handle the differences between Apple's clang and vanilla clang."""