Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View sl's full-sized avatar

Sam Lazarus sl

View GitHub Profile
@sl
sl / tasks.json
Last active April 28, 2019 02:19
[Swift Compiler Environment Configuration] Full Tasks.json Configuration
{
"version": "2.0.0",
"tasks": [
{
"label": "Ninja Build (Swift)",
"type": "shell",
"command": "ninja",
"args": [
"swift"
],
@sl
sl / tasks.json
Created April 28, 2019 02:15
[Swift Compiler Environment Configuration] Run Tests Task Inputs
{
"id": "testFilter",
"type": "promptString",
"description": "Runs the specified lit tests."
}
@sl
sl / tasks.json
Created April 28, 2019 02:13
[Swift Complier Environment Configuration] Run Tests Task
{
"label": "Run Test",
"type": "shell",
"command": "${LLVM_LIT_DIR}/lit.py",
"args": [
"-sv",
"--param",
"swift_site_config=${SWIFT_BUILD_DIR}/test-macosx-x86_64/lit.site.cfg",
"${fileDirname}",
"--filter=${fileBasename}"
@sl
sl / tasks.json
Created April 28, 2019 02:06
[Swift Complier Environment Configuration] Build Tasks
{
"label": "Ninja Build (Swift)",
"type": "shell",
"command": "ninja",
"args": [
"swift"
],
"options": {
"cwd": "${env:SWIFT_BUILD_DIR}"
},
@sl
sl / keybindings.json
Created April 28, 2019 02:01
[Swift Complier Environment Configuration] Add Keybinding For Task
{
"key": "<keyboard shortcut>",
"command": "workbench.action.tasks.runTask",
"args": "<task name>"
}
@sl
sl / tasks.json
Created April 28, 2019 01:58
[Swift Complier Environment Configuration] Format Task
{
"label": "Format changes",
"type": "shell",
"command": "git",
"args": [
"clang-format",
"master"
]
}
@sl
sl / launch.json
Created April 28, 2019 01:43
[Swift Complier Environment Configuration] Debug Launch
{
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug",
"program": "${env:SWIFT_BUILD_DIR}/bin/swift",
"args": ["${input:testFile}"],
"cwd": "${env:SWIFT_EXAMPLES_DIR}",
@sl
sl / c_cpp_properties.js
Last active April 28, 2019 03:07
[Swift Complier Environment Configuration] Framework inclusions
"compilerPath": "${workspaceFolder}/../build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/llvm-macosx-x86_64/bin/clang",
"cppStandard": "c++17",
"intelliSenseMode": "clang-x64"
// if you're on a mac
"macFrameworkPath": [
"/System/Library/Frameworks",
"/Library/Frameworks"
],
@sl
sl / c_cpp_properties.js
Last active April 28, 2019 03:19
[Swift Complier Environment Configuration] C/C++ Configuration
"includePath": [
// the include folder under your build directory
"${workspaceFolder}/../build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/swift-macosx-x86_64/include",
"${workspaceFolder}/../build/Ninja-RelWithDebInfoAssert+swift-DebugAssert/llvm-macosx-x86_64/include/**",
// the include folder for clang
"${workspaceFolder}/../clang/include",
// all the files in the project
"${workspaceFolder}/**",
// all files under the llvm include folder
"${workspaceFolder}/../llvm/include/**",
@sl
sl / clang_include_results.bash
Last active April 28, 2019 01:25
[Swift Complier Environment Configuration] Clang include results
clang -cc1 version 8.0.0 based upon LLVM 8.0.0 default target x86_64-apple-darwin18.2.0
ignoring nonexistent directory "/usr/include/c++/v1"
ignoring nonexistent directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/opt/llvm/bin/../include/c++/v1
/usr/local/include
/usr/local/Cellar/llvm/8.0.0/lib/clang/8.0.0/include
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)