{ "version": "2.0.0", "tasks": [ { "label": "Bazel build all (dbg)", "type": "shell", "command": "bazel", "args": ["build", "-c", "dbg", "//..."], "osx": { // OS X needs to set the bazel `spawn_strategy` option to `local` for symbols to work // correctly (https://github.com/bazelbuild/bazel/issues/6327). This `spawn_strategy` // precludes the use of sandboxing during the build (see // https://bazel.build/docs/user-manual#execution-strategy). "args": ["build", "-c", "dbg", "--spawn_strategy=local", "//..."] }, "group": { "kind": "build", "isDefault": true }, "problemMatcher": "$gcc", "presentation": { "echo": true, "reveal": "always", "focus": false, "panel": "shared", "showReuseMessage": false, "clear": false } }, { "label": "Bazel build workerd (dbg)", "type": "shell", "command": "bazel", "args": ["build", "-c", "dbg", "//src/workerd/server:workerd"], "osx": { // OS X needs to set the bazel `spawn_strategy` option to `local` for symbols to work // correctly (https://github.com/bazelbuild/bazel/issues/6327). This `spawn_strategy` // precludes the use of sandboxing during the build (see // https://bazel.build/docs/user-manual#execution-strategy). "args": [ "build", "-c", "dbg", "--spawn_strategy=local", "//src/workerd/server:workerd" ] }, "group": { "kind": "build", "isDefault": true }, "problemMatcher": "$gcc", "presentation": { "echo": true, "reveal": "always", "focus": false, "panel": "shared", "showReuseMessage": false, "clear": false } }, { "label": "Bazel build workerd (fastbuild)", "type": "shell", "command": "bazel", "args": ["build", "-c", "fastbuild", "//src/workerd/server:workerd"], "group": { "kind": "build", "isDefault": true }, "problemMatcher": "$gcc", "presentation": { "echo": true, "reveal": "always", "focus": false, "panel": "shared", "showReuseMessage": false, "clear": false } }, { "label": "Bazel build workerd (opt)", "type": "shell", "command": "bazel", "args": ["build", "-c", "opt", "//src/workerd/server:workerd"], // To enable debug symbols for an optimized build, add the following args for bazel: // "--strategy=local", "--copt='-g'", "--host_copt='-g'", "--strip=never" "group": { "kind": "build", "isDefault": false }, "problemMatcher": "$gcc", "presentation": { "echo": true, "reveal": "always", "focus": false, "panel": "shared", "showReuseMessage": false, "clear": false } }, { "label": "Bazel clean", "type": "shell", "command": "bazel", "args": ["clean"], "group": { "kind": "build", "isDefault": true }, "presentation": { "echo": true, "reveal": "always", "focus": false, "panel": "shared", "showReuseMessage": false, "clear": false } }, { "label": "Bazel clean --expunge", "type": "shell", "command": "bazel", "args": ["clean", "--expunge"], "group": { "kind": "build", "isDefault": true }, "presentation": { "echo": true, "reveal": "always", "focus": false, "panel": "shared", "showReuseMessage": false, "clear": false } }, { "label": "Bazel run all tests (dbg)", "type": "shell", "command": "bazel", "args": ["test", "-c", "dbg", "--nocache_test_results", "//..."], "group": { "kind": "test", "isDefault": true }, "problemMatcher": "$gcc", "presentation": { "echo": true, "reveal": "always", "focus": false, "panel": "shared", "showReuseMessage": false, "clear": false } }, { "label": "Bazel run all tests (fastbuild)", "type": "shell", "command": "bazel", "args": ["test", "-c", "fastbuild", "--nocache_test_results", "//..."], "group": { "kind": "test", "isDefault": true }, "problemMatcher": "$gcc", "presentation": { "echo": true, "reveal": "always", "focus": false, "panel": "shared", "showReuseMessage": false, "clear": false } }, { "label": "Bazel run all tests (opt)", "type": "shell", "command": "bazel", "args": ["test", "-c", "opt", "--nocache_test_results", "//..."], "group": { "kind": "test", "isDefault": true }, "problemMatcher": "$gcc", "presentation": { "echo": true, "reveal": "always", "focus": false, "panel": "shared", "showReuseMessage": false, "clear": false } }, { "label": "Generate rust-project.json", "command": "bazel", "args": ["run", "@rules_rust//tools/rust_analyzer:gen_rust_project"], "options": { "cwd": "${workspaceFolder}" }, "group": "build", "problemMatcher": [], "presentation": { "reveal": "never", "panel": "dedicated" }, "runOptions": { "runOn": "default" } }, { // Create ${workspaceFolder}/external for clangd on opening VSCode. "label": "Symlink external directory", "command": "${workspaceFolder}/tools/unix/create-external.sh", "windows": { "command": "${workspaceFolder}/tools/windows/create-external.bat" }, "group": "build", "problemMatcher": [], "presentation": { "reveal": "never", "panel": "dedicated" }, "runOptions": { "reevaluateOnRerun": false, "runOn": "folderOpen" } }, { "label": "Prepare wd-test TEST_TMPDIR", "detail": "Ensures a tmp directory for a wd-test exists and is empty.", "command": "/bin/sh", "args": [ "-c", "'rm -rf ${workspaceFolder}/bazel-out/test_tmpdir; mkdir ${workspaceFolder}/bazel-out/test_tmpdir'" ], "windows": { "args": [ "/c", "'del /q/s ${workspaceFolder}/bazel-out/test_tmpdir & mkdir ${workspaceFolder}/bazel-out/test_tmpdir'" ] }, "hide": true, "type": "shell", "runOptions": { "reevaluateOnRerun": true } }, { "label": "Prepare workerd wd-test (dbg)", "dependsOn": ["Bazel build workerd (dbg)", "Prepare wd-test TEST_TMPDIR"], "dependsOrder": "sequence", "group": "build", "detail": "Builds a debug workerd and prepares a test directory for wd-test", "hide": false, "runOptions": { "reevaluateOnRerun": true } }, { "label": "Generate doxygen", "command": "doxygen", "args": ["doxyfile"], "hide": false, "type": "shell", "problemMatcher": [] }, { "label": "Format all", "command": "python3", "args": ["${workspaceFolder}/tools/cross/format.py"], "group": "build", "problemMatcher": [], "presentation": { "reveal": "never", "focus": false, "panel": "shared" }, "runOptions": { "reevaluateOnRerun": true } } ] }