const path = require('path'); module.exports = { tags: async (tln) => [], dotenvs: async (tln) => [], env: async (tln, env) => { env.CLANG_HOME = env.TLN_COMPONENT_HOME; env.PATH = [path.join(env.TLN_COMPONENT_HOME, 'bin'), env.PATH].join(path.delimiter); }, options: async (tln) => [], inherits: async (tln) => [], depends: async (tln) => [], steps: async (tln) => [ { id: 'version', builder: async (tln, script) => { const id = script.env.TLN_COMPONENT_ID; const home = script.env.TLN_COMPONENT_HOME; const {name, version} = tln.unpackId(id); if (version) { script.set([` echo [clang] && clang --version `]); } }}, { id: 'install', builder: async (tln, script) => { const id = script.env.TLN_COMPONENT_ID; const home = script.env.TLN_COMPONENT_HOME; const {name, version} = tln.unpackId(id); if (version && tln.canInstallComponent(tln, id, home)) { script.set(tln.getDownloadScript(tln, { linux: { name: `clang+llvm-${version}-x86_64-linux-gnu-ubuntu-18.04.tar.xz`, opts: { src: `clang+llvm-${version}-x86_64-linux-gnu-ubuntu-18.04`, flt: `*`, dest: `.`, rmv: `clang+llvm-${version}-x86_64-linux-gnu-ubuntu-18.04` }, url: `https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/clang+llvm-${version}-x86_64-linux-gnu-ubuntu-18.04.tar.xz` }, darwin: { name: null, opts: { src: null, flt: `*`, dest: '.', rmv: null }, url: null }, win32: { name: null, opts: { src: null, flt: `*`, dest: `.`, rmv: null }, url: null } })); } } } ], components: async (tln) => require('./../components.js').map(v => ({ id: `clang-${v.id}` }) ) }