📈
objective-c
  • 前言
  • 编译原理
    • 编译LLVM
    • 我的第一个Clang插件
    • 自定义LibTooling
    • 自定义属性
    • AST
    • Swift
  • Foundation
    • Number
    • NSString
    • Class
    • Category
    • 琐事
    • 多线程
    • ARC
    • RunLoop
    • 算法
  • Network
  • Animation
  • JavaScriptCore
  • 架构设计
  • 跨平台
    • Flutter
  • UIKit
    • UIView
    • AutoLayout
    • WebView
  • ApplePay
  • In-App Purchase
  • Reveal
  • Xcode
Powered by GitBook
On this page
  • 创建项目
  • 创建工具目录
  • 输出参数

Was this helpful?

  1. 编译原理

自定义LibTooling

Previous我的第一个Clang插件Next自定义属性

Last updated 5 years ago

Was this helpful?

创建项目

因为需要基于LibTooling进行开发,选择了在Clang项目内添加一个Tools的方式来简化流程。

创建工具目录

cd llvm/tools/clang/tools && mkdir clang-peregrine && cd clang-peregrine

输出参数

${HOME}/Github/Peregrine/Example/Peregrine/PeregrineActionTest.m
--
-isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
-isystem
-I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/include
-I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1
-I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include
-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks

minimal

${HOME}/Github/Peregrine/Example/Peregrine/PeregrineActionTest1.m ${HOME}/Github/Peregrine/Example/Peregrine/PeregrineActionTest2.m -- -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk -isystem -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include -F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/Frameworks
参考系列文章