// compile.ce — compile a .cm or .ce file to native .dylib via QBE // // Usage: // cell compile // // Installs the dylib to .cell/lib//.dylib var shop = use('internal/shop') var build = use('build') var fd = use('fd') if (length(args) < 1) { print('usage: cell compile ') return } var file = args[0] if (!fd.is_file(file)) { print('file not found: ' + file) return } var abs = fd.realpath(file) var file_info = shop.file_info(abs) var pkg = file_info.package build.compile_native(abs, null, null, pkg)