天天看点

C++ Toolchains编译器Visual StudioGCCclangLanguage DialectLLDB

编译器

编译器综述 /编译器的工作过程  

从零开始写个编译器

iOS编译过程的原理和应用 

深入剖析 iOS 编译 Clang / LLVM 

一篇文章走进mac逆向的世界 

Pre-defined C/C++ Compiler Macros  

How to find out cl.exe's built-in macros  

C/C++ tip: How to list compiler predefined macros  

C++ Toolchains编译器Visual StudioGCCclangLanguage DialectLLDB

Visual Studio

>Visual Studio 2015 中的 Visual C++  

>> C++ 语言和标准库:C/C++ 预处理器参考  

>> 用于 Visual C++ 开发的 IDE 和工具  

>>> 生成 C/C++ 程序  

>>>> 在命令行上生成:C 程序 / [C++ 程序]() /NMAKE 参考  

>>>> C/C++ 生成参考  

>>>>> 编译 C/C++ 程序  

>>>>>> 编译器选项:/D(预处理器定义)、/U、/u(未定义符号)、/P(预处理到文件)、/link(将选项传递到链接器)  

>>>>>> 设置编译器选项:编译器命令行语法、CL 调用链接器  

GCC

gcc —— Using the GNU Compiler Collection (GCC)  

libstdc++ —— The GNU C++ Library  

cpp —— The C Preprocessor / Predefined Macros

Linux GCC编译器和GDB调试器  

预处理-编译-汇编-链接过程分析  

gcc编译出的elf文件分析  

GCC 编译的背后 /GCC 编译详解 /GCC编译器总结  

Compiling GCC 7 on macOS

clang

clang: a C language family frontend for LLVM

Clang Language Extensions

Clang vs Other Open Source Compilers

LLVM 与 Clang 介绍  

结构化编译器前端 Clang 介绍  

GCC,LLVM,Clang编译器对比

C/C++: clang 代替 gcc 

Clang 比 GCC 好在哪里? 

编译器(GNU & GCC & clang & llvm) 

mac 使用gcc 为什么编译错误是clang 提示? 

通过编译 eddic 来比较 GCC 4.7 和 Clang 3.1 的性能 

Language Dialect

Language Standards Supported by GCC 

Options Controlling C Dialect 

以下为 XCode | Project | Target | Build Settings 的截图。

C++ Toolchains编译器Visual StudioGCCclangLanguage DialectLLDB

C Language Dialect

Apple LLVM 9.0 - Language | C Language Dialect 对应 project.pbxproj 中 buildSettings 字典的 key =GCC_C_LANGUAGE_STANDARD。

Apple LLVM 8.1 & 9.0 支持的GCC_C_LANGUAGE_STANDARD 有以下8种:

  • "ansi";                       // ANSI C[-ansi]
  • "c89";                        // C89[-std=c89]
  • "gnu89";                   // GNU89[-std=gnu89]
  • "c99";                        // C99[-std=c99]
  • "gnu99";                   // GNU99[-std=gnu99]
  • "c11";                        // c11
  • "gnu11";                   // gnu11
  • "compiler-default"; // Compiler Default

C++ Language Dialect

Apple LLVM 9.0 - Language - C++ | C++ Language Dialect 对应 project.pbxproj 中 buildSettings 字典的 key =CLANG_CXX_LANGUAGE_STANDARD。

Apple LLVM 8.1 支持的CLANG_CXX_LANGUAGE_STANDARD 有以下7种:

  • "c++98";                   // C++98[-std=c++98]
  • "gnu++98";              // GNU++98[-std=gnu++98]
  • "c++0x";                   // C++11[-std=c++11]
  • "gnu++0x";              // GNU++11[-std=gnu++11]
  • "c++14";                   // C++11[-std=c++14]
  • "gnu++14";              // GNU++11[-std=gnu++14]
  • "compiler-default"; // Compiler Default

Apple LLVM 9.0 相比 8.1 增加支持 c++17 和 gnu++17:

  • "c++17";                  // C++11[-std=c++17]
  • "gnu++17";             // GNU++11[-std=gnu++17]

C++ Standard Library

Apple LLVM 9.0 - Language - C++ | C++ Standard Library 对应 project.pbxproj 中 buildSettings 字典的 key =CLANG_CXX_LIBRARY。

Apple LLVM 8.1 & 9.0 支持的CLANG_CXX_LIBRARY 有以下3种:

  • "libstdc++";              // libstdc++(GNU C++ standard library)
  • "libc++";                   // libc++(LLVM C++ standard library with C++11 support)
  • "compiler-default"; // Compiler Default

references

ANSI C, Standard C 与 GCC 

C语言的各种版本:C89,AMD1,C99,C11 

What is the default C mode for the current gcc (especially on Ubuntu)? 

LLDB

LLDB to GDB Command Map 

LLDB Quick Start Guide:GDB and LLDB Command Examples  

LLDB基础知识 /LLDB调试命令初探 

Dancing in the Debugger — A Waltz with LLDB /与调试器共舞 - LLDB 的华尔兹 @segmentfault