mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-01 21:09:26 -06:00
Merge remote-tracking branch 'origin/main' into claude-mg/explain
This commit is contained in:
@@ -161,3 +161,4 @@ From oldest to newest contributor, we would like to thank:
|
||||
- [RongDong Xu](https://github.com/arong)
|
||||
- [Adrien Bertrand](https://github.com/adriweb)
|
||||
- [Roberto Parolin](https://github.com/rparolin)
|
||||
- [Alfredo Correa](https://github.com/correaa)
|
||||
|
||||
@@ -2,11 +2,6 @@
|
||||
"use_appcontainer": true,
|
||||
"pids_max": 72,
|
||||
"mem_max": 1342177280,
|
||||
"allowed_paths": [
|
||||
{
|
||||
"path": "NUL",
|
||||
"rw": true
|
||||
}
|
||||
],
|
||||
"allowed_paths": [],
|
||||
"allowed_registry": []
|
||||
}
|
||||
|
||||
@@ -3990,7 +3990,7 @@ compiler.djggp494.semver=4.9.4
|
||||
|
||||
#################################
|
||||
# Zig c++
|
||||
group.zigcxx.compilers=zcxx060:zcxx070:zcxx071:zcxx080:zcxx090:zcxx0100:zcxx0110:zcxx0120:zcxx0121:zcxx0130:zcxx0140:zcxxtrunk
|
||||
group.zigcxx.compilers=zcxx060:zcxx070:zcxx071:zcxx080:zcxx090:zcxx0100:zcxx0110:zcxx0120:zcxx0121:zcxx0130:zcxx0140:zcxx0141:zcxxtrunk
|
||||
group.zigcxx.intelAsm=-mllvm --x86-asm-syntax=intel
|
||||
group.zigcxx.objdumper=/opt/compiler-explorer/gcc-10.2.0/bin/objdump
|
||||
group.zigcxx.options=
|
||||
@@ -4026,6 +4026,8 @@ compiler.zcxx0130.exe=/opt/compiler-explorer/zig-0.13.0/zig
|
||||
compiler.zcxx0130.semver=0.13.0
|
||||
compiler.zcxx0140.exe=/opt/compiler-explorer/zig-0.14.0/zig
|
||||
compiler.zcxx0140.semver=0.14.0
|
||||
compiler.zcxx0141.exe=/opt/compiler-explorer/zig-0.14.1/zig
|
||||
compiler.zcxx0141.semver=0.14.1
|
||||
compiler.zcxxtrunk.exe=/opt/compiler-explorer/zig-master/zig
|
||||
compiler.zcxxtrunk.semver=trunk
|
||||
compiler.zcxxtrunk.isNightly=true
|
||||
@@ -4376,7 +4378,7 @@ compiler.z180-clang-1507.options=-target z180 -g0 -nostdinc -fno-threadsafe-stat
|
||||
#################################
|
||||
#################################
|
||||
# Installed libs
|
||||
libs=abseil:array:async_simple:belleviews:beman_any_view:beman_exemplar:beman_execution:beman_iterator_interface:beman_inplace_vector:beman_net:beman_optional:beman_scope:beman_task:benchmark:benri:blaze:boost:bmulti:brigand:bronto:catch2:cccl:cctz:cereal:cmcstl2:cnl:cppcoro:cppitertools:cpptrace:crosscables:ctbignum:cthash:ctre:date:dataframe:dawjson:dlib:doctest:eastl:eigen:enoki:entt:etl:eve:expected_lite:fastor:flux:fmt:gcem:gemmlowp:glaze:glm:gnufs:gnulibbacktrace:gnuexp:googletest:gsl:hdf5:hedley:hfsm:highfive:highway:hotels-template-library:immer:jsoncons:jsoncpp:kiwaku:kokkos:kumi:kvasir:kyosu:lager:lagom:lexy:libassert:libbpf:libguarded:libsimdpp:libuv:llvm:llvmfs:lua:magic_enum:mfem:mimicpp:mlir:mp-coro:mp-units:namedtype:nanorange:nlohmann_json:nsimd:ofw:openssl:outcome:pegtl:pipes:proxy:pugixml:pybind11:python:rangesv3:raberu:rapidjson:reactive_plus_plus:scnlib:seastar:seqan3:simde:simdjson:sol2:spdlog:spy:stdexec:strong_type:taojson:taskflow:tbb:thinkcell:tlexpected:toml11:tomlplusplus:trompeloeil:tts:type_safe:unifex:ureact:vcl:xercesc:xsimd:xtensor:xtl:yomm2:zug:cli11:avr-libstdcpp:curl:copperspice:sqlite:ztdcuneicode:ztdencodingtables:ztdidk:ztdstaticcontainers:ztdtext:ztdplatform:qt:quill:pcre2:widberg-defs:jwt-cpp:xieite:option:mdspan
|
||||
libs=abseil:array:async_simple:belleviews:beman_any_view:beman_exemplar:beman_execution:beman_iterator_interface:beman_inplace_vector:beman_net:beman_optional:beman_scope:beman_task:benchmark:benri:blaze:boost:bmpi3:bmulti:brigand:bronto:catch2:cccl:cctz:cereal:cmcstl2:cnl:cppcoro:cppitertools:cpptrace:crosscables:ctbignum:cthash:ctre:date:dataframe:dawjson:dlib:doctest:eastl:eigen:enoki:entt:etl:eve:expected_lite:fastor:flux:fmt:gcem:gemmlowp:glaze:glm:gnufs:gnulibbacktrace:gnuexp:googletest:gsl:hdf5:hedley:hfsm:highfive:highway:hotels-template-library:immer:jsoncons:jsoncpp:kiwaku:kokkos:kumi:kvasir:kyosu:lager:lagom:lexy:libassert:libbpf:libguarded:libsimdpp:libuv:llvm:llvmfs:lua:magic_enum:mfem:mimicpp:mlir:mp-coro:mp-units:namedtype:nanorange:nlohmann_json:nsimd:ofw:openssl:outcome:pegtl:pipes:proxy:pugixml:pybind11:python:rangesv3:raberu:rapidjson:reactive_plus_plus:scnlib:seastar:seqan3:simde:simdjson:sol2:spdlog:spy:stdexec:strong_type:taojson:taskflow:tbb:thinkcell:tlexpected:toml11:tomlplusplus:trompeloeil:tts:type_safe:unifex:ureact:vcl:xercesc:xsimd:xtensor:xtl:yomm2:zug:cli11:avr-libstdcpp:curl:copperspice:sqlite:ztdcuneicode:ztdencodingtables:ztdidk:ztdstaticcontainers:ztdtext:ztdplatform:qt:quill:pcre2:widberg-defs:jwt-cpp:xieite:option:mdspan
|
||||
|
||||
libs.abseil.name=Abseil
|
||||
libs.abseil.versions=202501270
|
||||
@@ -4571,6 +4573,13 @@ libs.boost.versions.187.version=1.87.0
|
||||
libs.boost.versions.187.packagedheaders=true
|
||||
libs.boost.versions.187.lookupname=boost_bin
|
||||
|
||||
libs.bmpi3.name=B-MPI3
|
||||
libs.bmpi3.url=https://gitlab.com/correaa/boost-mpi3
|
||||
libs.bmpi3.versions=trunk
|
||||
libs.bmpi3.description=Modern C++ MPI-3 wrapper
|
||||
libs.bmpi3.versions.trunk.version=trunk
|
||||
libs.bmpi3.versions.trunk.path=/opt/compiler-explorer/libs/bmpi3/trunk/include
|
||||
|
||||
libs.bmulti.name=B-Multi
|
||||
libs.bmulti.url=https://gitlab.com/correaa/boost-multi
|
||||
libs.bmulti.versions=trunk
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3705,7 +3705,7 @@ compiler.tinycc0927.semver=0.9.27
|
||||
|
||||
#################################
|
||||
# Zig cc
|
||||
group.zigcc.compilers=zcc060:zcc070:zcc071:zcc080:zcc090:zcc0100:zcc0110:zcc0120:zcc0121:zcc0130:zcc0140:zcctrunk
|
||||
group.zigcc.compilers=zcc060:zcc070:zcc071:zcc080:zcc090:zcc0100:zcc0110:zcc0120:zcc0121:zcc0130:zcc0140:zcc0141:zcctrunk
|
||||
group.zigcc.intelAsm=-mllvm --x86-asm-syntax=intel
|
||||
group.zigcc.objdumper=/opt/compiler-explorer/gcc-10.2.0/bin/objdump
|
||||
group.zigcc.options=
|
||||
@@ -3740,6 +3740,8 @@ compiler.zcc0130.exe=/opt/compiler-explorer/zig-0.13.0/zig
|
||||
compiler.zcc0130.semver=0.13.0
|
||||
compiler.zcc0140.exe=/opt/compiler-explorer/zig-0.14.0/zig
|
||||
compiler.zcc0140.semver=0.14.0
|
||||
compiler.zcc0141.exe=/opt/compiler-explorer/zig-0.14.1/zig
|
||||
compiler.zcc0141.semver=0.14.1
|
||||
compiler.zcctrunk.exe=/opt/compiler-explorer/zig-master/zig
|
||||
compiler.zcctrunk.semver=trunk
|
||||
compiler.zcctrunk.isNightly=true
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
compilers=&crystal
|
||||
defaultCompiler=crystal1160
|
||||
defaultCompiler=crystal1163
|
||||
|
||||
group.crystal.compilers=crystal1160:crystal1151:crystal1141:crystal1133:crystal1122:crystal1111:crystal1101:crystal192:crystal182:crystal173:crystal162:crystal151:crystal141:crystal132:crystal122:crystal11:crystal10:crystal036:crystal035:crystal034:crystal033:crystal032:crystal031:crystal030:crystal029
|
||||
group.crystal.compilers=crystal1163:crystal1151:crystal1141:crystal1133:crystal1122:crystal1111:crystal1101:crystal192:crystal182:crystal173:crystal162:crystal151:crystal141:crystal132:crystal122:crystal11:crystal10:crystal036:crystal035:crystal034:crystal033:crystal032:crystal031:crystal030:crystal029
|
||||
group.crystal.isSemVer=true
|
||||
group.crystal.baseName=Crystal
|
||||
group.crystal.groupName=Crystal x86-64
|
||||
@@ -13,9 +13,10 @@ group.crystal.licenseLink=https://github.com/crystal-lang/crystal/blob/master/LI
|
||||
group.crystal.licenseName=Apache 2.0 with Swift exception
|
||||
group.crystal.licensePreamble=Copyright 2012-2025 Manas Technology Solutions.
|
||||
|
||||
compiler.crystal1160.semver=1.16.0
|
||||
compiler.crystal1160.exe=/opt/compiler-explorer/crystal-1.16.0/bin/crystal
|
||||
compiler.crystal1160.cc=/opt/compiler-explorer/gcc-snapshot/bin/gcc
|
||||
compiler.crystal1163.semver=1.16.3
|
||||
compiler.crystal1163.exe=/opt/compiler-explorer/crystal-1.16.3/bin/crystal
|
||||
compiler.crystal1163.cc=/opt/compiler-explorer/gcc-snapshot/bin/gcc
|
||||
compiler.crystal1163.alias=crystal1160
|
||||
compiler.crystal1151.semver=1.15.1
|
||||
compiler.crystal1151.exe=/opt/compiler-explorer/crystal-1.15.1/bin/crystal
|
||||
compiler.crystal1151.cc=/opt/compiler-explorer/gcc-snapshot/bin/gcc
|
||||
|
||||
@@ -166,10 +166,10 @@ compiler.gl12113.goroot=/opt/compiler-explorer/golang-1.21.13/go
|
||||
compiler.gl12212.exe=/opt/compiler-explorer/golang-1.22.12/go/bin/go
|
||||
compiler.gl12212.semver=1.22.12
|
||||
compiler.gl12212.goroot=/opt/compiler-explorer/golang-1.22.12/go
|
||||
compiler.gl1238.exe=/opt/compiler-explorer/golang-1.23.2/go/bin/go
|
||||
compiler.gl1238.exe=/opt/compiler-explorer/golang-1.23.8/go/bin/go
|
||||
compiler.gl1238.semver=1.23.8
|
||||
compiler.gl1238.goroot=/opt/compiler-explorer/golang-1.23.8/go
|
||||
compiler.gl1242.exe=/opt/compiler-explorer/golang-1.24.8/go/bin/go
|
||||
compiler.gl1242.exe=/opt/compiler-explorer/golang-1.24.2/go/bin/go
|
||||
compiler.gl1242.semver=1.24.2
|
||||
compiler.gl1242.goroot=/opt/compiler-explorer/golang-1.24.2/go
|
||||
compiler.gltip.exe=/opt/compiler-explorer/go-tip/bin/go
|
||||
|
||||
@@ -313,7 +313,13 @@ compiler.mrustc-master.isNightly=true
|
||||
#################################
|
||||
# Installed libs, generated from ce_install generate-rust-crates
|
||||
# Don't modify directly
|
||||
libs=aho-corasick:ansi_term:anyhow:arrayvec:atty:autocfg:backtrace:base64:bincode:bitflags:block-buffer:bumpalo:byteorder:bytes:cc:cfg-if:chrono:clap:color-eyre:contracts:crossbeam-channel:crossbeam-deque:crossbeam-epoch:crossbeam-utils:dashmap:digest:either:env_logger:eyre:fnv:futures:futures-channel:futures-core:futures-task:futures-util:generic-array:getrandom:h2:hashbrown:heck:http:httparse:hyper:idna:indexmap:itertools:itoa:lazy_static:libc:lock_api:log:matches:memchr:memoffset:miniz_oxide:mio:ndarray:nix:num:num-integer:num-traits:num_cpus:num_traits:once_cell:opaque-debug:parking_lot:parking_lot_core:percent-encoding:phf:pin-project-lite:pkg-config:ppv-lite86:proc-macro-hack:proc-macro2:quote:rand:rand_chacha:rand_core:rayon:regex:regex-syntax:rustc_version:ryu:scopeguard:semver:semver-parser:serde:serde_derive:serde_json:slab:smallvec:socket2:strsim:subtle:syn:termcolor:textwrap:thiserror:thiserror-impl:thread_local:time:tokio:toml:typenum:unicode-bidi:unicode-normalization:unicode-segmentation:unicode-width:unicode-xid:url:vec_map:version_check:wide:winapi:zerocopy
|
||||
libs=ahash:aho-corasick:ansi_term:anyhow:arrayvec:atty:autocfg:backtrace:base64:bincode:bitflags:block-buffer:bumpalo:byteorder:bytes:cc:cfg-if:chrono:clap:color-eyre:contracts:crossbeam-channel:crossbeam-deque:crossbeam-epoch:crossbeam-utils:dashmap:digest:either:env_logger:eyre:fnv:futures:futures-channel:futures-core:futures-task:futures-util:generic-array:getrandom:h2:hashbrown:heck:http:httparse:hyper:idna:indexmap:itertools:itoa:lazy_static:libc:lock_api:log:matches:memchr:memoffset:miniz_oxide:mio:ndarray:nix:num:num-integer:num-traits:num_cpus:num_traits:once_cell:opaque-debug:parking_lot:parking_lot_core:percent-encoding:phf:pin-project-lite:pkg-config:ppv-lite86:proc-macro-hack:proc-macro2:quote:rand:rand_chacha:rand_core:rayon:regex:regex-syntax:rustc_version:ryu:scopeguard:semver:semver-parser:serde:serde_derive:serde_json:slab:smallvec:socket2:strsim:subtle:syn:termcolor:textwrap:thiserror:thiserror-impl:thread_local:time:tokio:toml:typenum:unicode-bidi:unicode-normalization:unicode-segmentation:unicode-width:unicode-xid:url:vec_map:version_check:wide:winapi:zerocopy
|
||||
|
||||
libs.ahash.name=ahash
|
||||
libs.ahash.url=https://crates.io/crates/ahash
|
||||
libs.ahash.versions=0812
|
||||
libs.ahash.versions.0812.version=0.8.12
|
||||
libs.ahash.versions.0812.path=libahash.rlib
|
||||
|
||||
libs.aho-corasick.name=aho-corasick
|
||||
libs.aho-corasick.url=https://crates.io/crates/aho-corasick
|
||||
@@ -1011,7 +1017,7 @@ libs.zerocopy.versions.0732.path=libzerocopy.rlib
|
||||
#################################
|
||||
# Installed tools
|
||||
|
||||
tools=clippy:ldd:llvm-mcatrunk:llvm-dwarfdumptrunk:osacatrunk:pahole:readelf:nm:strings:rustfmt1436:bloaty11
|
||||
tools=clippy:miri:ldd:llvm-mcatrunk:llvm-dwarfdumptrunk:osacatrunk:pahole:readelf:nm:strings:rustfmt1436:bloaty11
|
||||
|
||||
tools.clippy.name=Clippy
|
||||
# overridden by `runTool`
|
||||
@@ -1024,6 +1030,13 @@ tools.clippy.includeKey=supportsClippy
|
||||
# https://github.com/compiler-explorer/compiler-explorer/pull/7477#pullrequestreview-2662514775
|
||||
tools.clippy.exclude=r1280:r1271:r1270:r1260:r1250:r1240:r1230:r1220:r1210:r1200:r1190:r1180:r1170:r1160:r1151:r1140:r1130:r1120:r1110:r1100:r190$:r180$:r170$:r160$:r150$:r140$:r130$:r120$:r110$:r100$
|
||||
|
||||
tools.miri.name=Miri nightly
|
||||
tools.miri.exe=/opt/compiler-explorer/rust-miri-nightly/bin/miri
|
||||
tools.miri.options=--sysroot=/opt/compiler-explorer/rust-miri-nightly/miri-sysroot --color=always
|
||||
tools.miri.type=independent
|
||||
tools.miri.class=miri-tool
|
||||
tools.miri.stdinHint=disabled
|
||||
|
||||
tools.ldd.name=ldd
|
||||
tools.ldd.exe=/usr/bin/ldd
|
||||
tools.ldd.type=postcompilation
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
compilers=&zig
|
||||
defaultCompiler=z0140
|
||||
defaultCompiler=z0141
|
||||
|
||||
# When adding a compiler here, please add it in the &zigcc and &zigcxx compiler groups too (C and C++ files, respectively)
|
||||
group.zig.compilers=ztrunk:z020:z030:z040:z050:z060:z070:z071:z080:z090:z0100:z0110:z0120:z0121:z0130:z0140
|
||||
group.zig.compilers=ztrunk:z020:z030:z040:z050:z060:z070:z071:z080:z090:z0100:z0110:z0120:z0121:z0130:z0140:z0141
|
||||
group.zig.objdumper=/opt/compiler-explorer/gcc-11.1.0/bin/objdump
|
||||
group.zig.isSemVer=true
|
||||
group.zig.baseName=zig
|
||||
@@ -46,6 +46,8 @@ compiler.z0130.exe=/opt/compiler-explorer/zig-0.13.0/zig
|
||||
compiler.z0130.semver=0.13.0
|
||||
compiler.z0140.exe=/opt/compiler-explorer/zig-0.14.0/zig
|
||||
compiler.z0140.semver=0.14.0
|
||||
compiler.z0141.exe=/opt/compiler-explorer/zig-0.14.1/zig
|
||||
compiler.z0141.semver=0.14.1
|
||||
|
||||
#################################
|
||||
#################################
|
||||
|
||||
@@ -960,6 +960,19 @@ export class BaseCompiler {
|
||||
});
|
||||
}
|
||||
|
||||
getSharedLibraryBinPaths(libraries: SelectedLibraryVersion[], dirPath?: string): string[] {
|
||||
return libraries.flatMap(selectedLib => {
|
||||
const foundVersion = this.findLibVersion(selectedLib);
|
||||
if (!foundVersion) return [];
|
||||
|
||||
const paths: string[] = [];
|
||||
if (this.buildenvsetup && !this.buildenvsetup.extractAllToRoot && dirPath) {
|
||||
paths.push(path.join(dirPath, selectedLib.id, 'bin'));
|
||||
}
|
||||
return paths;
|
||||
});
|
||||
}
|
||||
|
||||
protected getSharedLibraryPathsAsArguments(
|
||||
libraries: SelectedLibraryVersion[],
|
||||
libDownloadPath: string | undefined,
|
||||
@@ -2168,6 +2181,13 @@ export class BaseCompiler {
|
||||
);
|
||||
}
|
||||
|
||||
executeParameters.env.PATH = [
|
||||
...this.getSharedLibraryBinPaths(key.libraries, buildResult.dirPath),
|
||||
executeParameters.env.PATH,
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(path.delimiter);
|
||||
|
||||
const execTriple = await RemoteExecutionQuery.guessExecutionTripleForBuildresult(buildResult);
|
||||
if (!this.compiler.emulated && !matchesCurrentHost(execTriple)) {
|
||||
if (await RemoteExecutionQuery.isPossible(execTriple)) {
|
||||
|
||||
@@ -101,9 +101,13 @@ export async function copyNeededDlls(
|
||||
execoptions: ExecutionOptionsWithEnv,
|
||||
): Promise<void> {
|
||||
const winutils = new WinUtils(execFunction, objdumper, execoptions);
|
||||
const dlls = await winutils.get_dlls_used(executableFilename);
|
||||
for (const dll of dlls) {
|
||||
const infolder = path.join(dirPath, path.basename(dll));
|
||||
await fs.copyFile(dll, infolder);
|
||||
try {
|
||||
const dlls = await winutils.get_dlls_used(executableFilename);
|
||||
for (const dll of dlls) {
|
||||
const infolder = path.join(dirPath, path.basename(dll));
|
||||
await fs.copyFile(dll, infolder);
|
||||
}
|
||||
} catch (e) {
|
||||
logger.error(`Error while retreiving or copying dll dependencies of ${executableFilename}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,6 +50,7 @@ export class BuildEnvSetupBase {
|
||||
public compilerArch: string | false;
|
||||
protected compilerTypeOrGCC: any;
|
||||
public compilerSupportsX86: boolean;
|
||||
public compilerSupportsAMD64: boolean;
|
||||
public defaultLibCxx: string;
|
||||
|
||||
constructor(compilerInfo: CompilerInfo, env: CompilationEnvironment) {
|
||||
@@ -61,22 +62,54 @@ export class BuildEnvSetupBase {
|
||||
this.compilerTypeOrGCC = compilerInfo.compilerType || 'gcc';
|
||||
if (this.compilerTypeOrGCC === 'clang-intel') this.compilerTypeOrGCC = 'gcc';
|
||||
this.compilerSupportsX86 = !this.compilerArch;
|
||||
this.compilerSupportsAMD64 = this.compilerSupportsX86;
|
||||
this.defaultLibCxx = 'libstdc++';
|
||||
}
|
||||
|
||||
async initialise(execCompilerCachedFunc: ExecCompilerCachedFunc) {
|
||||
if (this.compilerArch) return;
|
||||
|
||||
await this.hasSupportForArch(execCompilerCachedFunc, 'x86')
|
||||
.then(res => (this.compilerSupportsX86 = res))
|
||||
.catch(error => {
|
||||
// Log & keep going, we assume x86 is supported
|
||||
logger.error('Could not check for x86 arch support', error);
|
||||
});
|
||||
|
||||
if (this.compilerTypeOrGCC === 'win32-vc') {
|
||||
await this.hasSupportForArch(execCompilerCachedFunc, 'x86_64')
|
||||
.then(res => (this.compilerSupportsAMD64 = res))
|
||||
.catch(error => {
|
||||
logger.error('Could not check for x86_64 arch support', error);
|
||||
});
|
||||
|
||||
if (this.compilerSupportsX86) {
|
||||
this.compilerArch = 'x86';
|
||||
} else if (this.compilerSupportsAMD64) {
|
||||
this.compilerArch = 'x86_64';
|
||||
}
|
||||
}
|
||||
|
||||
logger.debug(
|
||||
`Compiler ${this.compiler.exe} supports x86: ${this.compilerSupportsX86}, x86_64: ${this.compilerSupportsAMD64}`,
|
||||
);
|
||||
}
|
||||
|
||||
protected get_support_check_text(group: string, compilerType: string, arch: string) {
|
||||
if (group.includes('icc')) {
|
||||
if (arch === 'x86') return '-m32';
|
||||
if (arch === 'x86_64') return '-m64';
|
||||
} else if (compilerType === 'win32-vc') {
|
||||
if (arch === 'x86') return 'for x86';
|
||||
if (arch === 'x86_64') return 'for x64';
|
||||
if (arch === 'arm64') return 'for ARM64';
|
||||
}
|
||||
|
||||
return arch;
|
||||
}
|
||||
|
||||
async hasSupportForArch(execCompilerCached: ExecCompilerCachedFunc, arch: Arch): Promise<boolean> {
|
||||
let result: any;
|
||||
let searchFor = arch as string;
|
||||
if (this.compiler.exe.includes('icpx')) {
|
||||
return arch === 'x86' || arch === 'x86_64';
|
||||
}
|
||||
@@ -85,26 +118,29 @@ export class BuildEnvSetupBase {
|
||||
}
|
||||
if (this.compiler.group === 'icc') {
|
||||
result = await execCompilerCached(this.compiler.exe, ['--help']);
|
||||
if (arch === 'x86') {
|
||||
searchFor = '-m32';
|
||||
} else if (arch === 'x86_64') {
|
||||
searchFor = '-m64';
|
||||
}
|
||||
} else if (this.compilerTypeOrGCC === 'gcc') {
|
||||
} else if (this.compilerTypeOrGCC === 'gcc' || this.compilerTypeOrGCC === 'win32-mingw-gcc') {
|
||||
if (this.compiler.exe.includes('/icpx')) {
|
||||
return arch === 'x86' || arch === 'x86_64';
|
||||
}
|
||||
result = await execCompilerCached(this.compiler.exe, ['--target-help']);
|
||||
} else if (this.compilerTypeOrGCC === 'clang') {
|
||||
} else if (this.compilerTypeOrGCC === 'clang' || this.compilerTypeOrGCC === 'win32-mingw-clang') {
|
||||
const binpath = path.dirname(this.compiler.exe);
|
||||
const llc = path.join(binpath, 'llc');
|
||||
if (await utils.fileExists(llc)) {
|
||||
result = await execCompilerCached(llc, ['--version']);
|
||||
}
|
||||
} else if (this.compilerTypeOrGCC === 'win32-vc') {
|
||||
result = await execCompilerCached(this.compiler.exe, []);
|
||||
}
|
||||
|
||||
if (result) {
|
||||
return result.stdout ? result.stdout.includes(searchFor) : false;
|
||||
const searchFor = this.get_support_check_text(this.compiler.group, this.compilerTypeOrGCC, arch as string);
|
||||
if (this.compilerTypeOrGCC === 'win32-vc' && result.stderr) return result.stderr.includes(searchFor);
|
||||
if (result.stdout) {
|
||||
return result.stdout.includes(searchFor);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -170,6 +206,12 @@ export class BuildEnvSetupBase {
|
||||
}
|
||||
|
||||
getTarget(key: CacheKey): string {
|
||||
if (this.compilerTypeOrGCC === 'win32-vc') {
|
||||
if (this.compilerSupportsX86) return 'x86';
|
||||
if (this.compilerSupportsAMD64) return 'x86_64';
|
||||
return '';
|
||||
}
|
||||
|
||||
if (!this.compilerSupportsX86) return '';
|
||||
if (this.compilerArch) return this.compilerArch;
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import os from 'node:os';
|
||||
import path from 'node:path';
|
||||
import {Readable} from 'node:stream';
|
||||
import zlib from 'node:zlib';
|
||||
@@ -63,6 +64,7 @@ export class BuildEnvSetupCeConanDirect extends BuildEnvSetupBase {
|
||||
protected host: any;
|
||||
protected onlyonstaticliblink: any;
|
||||
protected extractAllToRoot: boolean;
|
||||
protected conan_os: string;
|
||||
|
||||
static get key() {
|
||||
return 'ceconan';
|
||||
@@ -74,6 +76,7 @@ export class BuildEnvSetupCeConanDirect extends BuildEnvSetupBase {
|
||||
this.host = compilerInfo.buildenvsetup!.props('host', '');
|
||||
this.onlyonstaticliblink = compilerInfo.buildenvsetup!.props('onlyonstaticliblink', '');
|
||||
this.extractAllToRoot = false;
|
||||
this.conan_os = os.platform() === 'win32' ? 'Windows' : 'Linux';
|
||||
}
|
||||
|
||||
async getAllPossibleBuilds(libid: string, version: string): Promise<any> {
|
||||
@@ -233,7 +236,7 @@ export class BuildEnvSetupCeConanDirect extends BuildEnvSetupBase {
|
||||
const flagcollection = '';
|
||||
|
||||
return {
|
||||
os: 'Linux',
|
||||
os: this.conan_os,
|
||||
build_type: 'Debug',
|
||||
compiler: this.compilerTypeOrGCC,
|
||||
'compiler.version': this.compiler.id,
|
||||
@@ -247,9 +250,18 @@ export class BuildEnvSetupCeConanDirect extends BuildEnvSetupBase {
|
||||
async findMatchingHash(buildProperties: ConanBuildProperties, possibleBuilds: any) {
|
||||
return _.findKey(possibleBuilds, elem => {
|
||||
return _.all(buildProperties, (val, key) => {
|
||||
if ((key === 'compiler' || key === 'compiler.version') && elem.settings[key] === 'headeronly') {
|
||||
return true;
|
||||
}
|
||||
if ((key === 'compiler' || key === 'compiler.version') && elem.settings[key] === 'cshared') {
|
||||
return true;
|
||||
}
|
||||
if (key === 'compiler.libcxx' && elem.settings['compiler'] === 'headeronly') {
|
||||
return true;
|
||||
}
|
||||
if (key === 'arch' && elem.settings['compiler'] === 'headeronly') {
|
||||
return true;
|
||||
}
|
||||
if (key === 'compiler.libcxx' && elem.settings['compiler'] === 'cshared') {
|
||||
return true;
|
||||
}
|
||||
|
||||
+43
-4
@@ -22,9 +22,11 @@
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import fs from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
import type {ParseFiltersAndOutputOptions} from '../../types/features/filters.interfaces.js';
|
||||
import {BaseCompiler} from '../base-compiler.js';
|
||||
import {changeExtension} from '../utils.js';
|
||||
|
||||
export class MojoCompiler extends BaseCompiler {
|
||||
static get key() {
|
||||
@@ -34,19 +36,21 @@ export class MojoCompiler extends BaseCompiler {
|
||||
constructor(info, env) {
|
||||
super(info, env);
|
||||
this.delayCleanupTemp = true;
|
||||
this.compiler.supportsOptOutput = true;
|
||||
this.compiler.supportsIrView = true;
|
||||
this.compiler.irArg = ['--emit=llvm'];
|
||||
this.compiler.irArg = ['--emit', 'llvm'];
|
||||
this.compiler.minIrArgs = ['--emit=llvm'];
|
||||
}
|
||||
|
||||
override getOutputFilename(dirPath: string, inputFileBase: string) {
|
||||
// This method tells CE where to find the assembly output
|
||||
const outputPath = path.join(dirPath, 'example.s');
|
||||
const outputPath = path.join(dirPath, inputFileBase + '.s');
|
||||
return outputPath;
|
||||
}
|
||||
|
||||
override optionsForFilter(filters: ParseFiltersAndOutputOptions, outputFilename: string, userOptions: string[]) {
|
||||
if (filters.binary) return ['build'];
|
||||
return ['build', '--emit=asm'];
|
||||
return ['build', '--emit=asm', '-o', outputFilename];
|
||||
}
|
||||
|
||||
override getSharedLibraryPathsAsArguments() {
|
||||
@@ -54,6 +58,41 @@ export class MojoCompiler extends BaseCompiler {
|
||||
}
|
||||
|
||||
override getExecutableFilename(dirPath: string, outputFilebase: string) {
|
||||
return path.join(dirPath, 'example');
|
||||
const executablePath = path.join(dirPath, 'example');
|
||||
return executablePath;
|
||||
}
|
||||
|
||||
override getIrOutputFilename(inputFilename: string): string {
|
||||
return inputFilename.replace(/\.mojo$/, '.ll');
|
||||
}
|
||||
|
||||
override async generateIR(
|
||||
inputFilename: string,
|
||||
options: string[],
|
||||
irOptions: any,
|
||||
produceCfg: boolean,
|
||||
filters: any,
|
||||
) {
|
||||
// Remove -o/--emit and their values from options
|
||||
const filteredOptions: string[] = options.filter(
|
||||
(opt, idx, arr) =>
|
||||
opt !== '-o' &&
|
||||
opt !== '--emit' &&
|
||||
!opt.startsWith('--emit=') &&
|
||||
arr[idx - 1] !== '-o' &&
|
||||
arr[idx - 1] !== '--emit',
|
||||
);
|
||||
// Compute the .ll output path
|
||||
const llPath = changeExtension(inputFilename, '.ll');
|
||||
const newOptions = [...filteredOptions, '--emit=llvm', '-o', llPath];
|
||||
const execOptions = this.getDefaultExecOptions();
|
||||
execOptions.maxOutput = 1024 * 1024 * 1024;
|
||||
const output = await this.runCompiler(this.compiler.exe, newOptions, this.compileFilename, execOptions);
|
||||
if (output.code !== 0) {
|
||||
console.error('Mojo IR build failed:', newOptions, output.stderr, output.stdout);
|
||||
return {asm: [{text: 'Failed to run compiler to get IR code'}]};
|
||||
}
|
||||
const irText = await fs.readFile(llPath, 'utf8');
|
||||
return {asm: irText.split('\n').map(text => ({text}))};
|
||||
}
|
||||
}
|
||||
|
||||
+41
-7
@@ -27,13 +27,15 @@ import path from 'node:path';
|
||||
import _ from 'underscore';
|
||||
|
||||
import {splitArguments} from '../../shared/common-utils.js';
|
||||
import type {CacheKey, ExecutionOptions} from '../../types/compilation/compilation.interfaces.js';
|
||||
import type {BuildResult, CacheKey, ExecutionOptions} from '../../types/compilation/compilation.interfaces.js';
|
||||
import type {ConfiguredOverrides} from '../../types/compilation/compiler-overrides.interfaces.js';
|
||||
import type {PreliminaryCompilerInfo} from '../../types/compiler.interfaces.js';
|
||||
import {UnprocessedExecResult} from '../../types/execution/execution.interfaces.js';
|
||||
import type {ParseFiltersAndOutputOptions} from '../../types/features/filters.interfaces.js';
|
||||
import {SelectedLibraryVersion} from '../../types/libraries/libraries.interfaces.js';
|
||||
import {unwrap} from '../assert.js';
|
||||
import {BaseCompiler} from '../base-compiler.js';
|
||||
import {copyNeededDlls} from '../binaries/win-utils.js';
|
||||
import {CompilationEnvironment} from '../compilation-env.js';
|
||||
import {MapFileReaderVS} from '../mapfiles/map-file-vs.js';
|
||||
import {AsmParser} from '../parsers/asm-parser.js';
|
||||
@@ -64,10 +66,15 @@ export class Win32Compiler extends BaseCompiler {
|
||||
return this.getExecutableFilename(path.dirname(defaultOutputFilename), 'output');
|
||||
}
|
||||
|
||||
override getSharedLibraryPathsAsArguments(libraries: SelectedLibraryVersion[]) {
|
||||
const libPathFlag = this.compiler.libpathFlag || '/LIBPATH:';
|
||||
override getSharedLibraryPathsAsArguments(
|
||||
libraries: SelectedLibraryVersion[],
|
||||
libDownloadPath: string | undefined,
|
||||
toolchainPath: string | undefined,
|
||||
dirPath: string,
|
||||
): string[] {
|
||||
const libPathFlag = '/LIBPATH:';
|
||||
|
||||
return this.getSharedLibraryPaths(libraries).map(path => libPathFlag + path);
|
||||
return this.getSharedLibraryPaths(libraries, dirPath).map(path => libPathFlag + path);
|
||||
}
|
||||
|
||||
// Ofek: foundVersion having 'liblink' makes me suspicious of the decision to annotate everywhere
|
||||
@@ -110,7 +117,9 @@ export class Win32Compiler extends BaseCompiler {
|
||||
options = options.concat(unwrap(this.compiler.optArg));
|
||||
}
|
||||
|
||||
const libIncludes = this.getIncludeArguments(libraries, path.dirname(inputFilename));
|
||||
const dirPath = path.dirname(inputFilename);
|
||||
|
||||
const libIncludes = this.getIncludeArguments(libraries, dirPath);
|
||||
const libOptions = this.getLibraryOptions(libraries);
|
||||
let libLinks: any[] = [];
|
||||
let libPaths: string[] = [];
|
||||
@@ -120,7 +129,7 @@ export class Win32Compiler extends BaseCompiler {
|
||||
if (filters.binary) {
|
||||
preLink = ['/link'];
|
||||
libLinks = this.getSharedLibraryLinks(libraries);
|
||||
libPaths = this.getSharedLibraryPathsAsArguments(libraries);
|
||||
libPaths = this.getSharedLibraryPathsAsArguments(libraries, undefined, undefined, dirPath);
|
||||
staticlibLinks = this.getStaticLibraryLinks(libraries);
|
||||
}
|
||||
|
||||
@@ -162,6 +171,12 @@ export class Win32Compiler extends BaseCompiler {
|
||||
) {
|
||||
options = options.filter(option => option !== '/utf-8');
|
||||
}
|
||||
|
||||
// test for debug/release switches to override with, default is /MDd because libraries use that
|
||||
if (userOptions.some(option => option.startsWith('/MD') || option.startsWith('/MT'))) {
|
||||
options = options.filter(option => option !== '/MDd');
|
||||
}
|
||||
|
||||
return [options, overrides];
|
||||
}
|
||||
|
||||
@@ -203,7 +218,7 @@ export class Win32Compiler extends BaseCompiler {
|
||||
return this.asm.process(result.asm, filters);
|
||||
}
|
||||
|
||||
override exec(compiler: string, args: string[], options_: ExecutionOptions) {
|
||||
override async exec(compiler: string, args: string[], options_: ExecutionOptions): Promise<UnprocessedExecResult> {
|
||||
const options = Object.assign({}, options_);
|
||||
options.env = Object.assign({}, options.env);
|
||||
|
||||
@@ -219,4 +234,23 @@ export class Win32Compiler extends BaseCompiler {
|
||||
|
||||
return super.exec(compiler, args, options);
|
||||
}
|
||||
|
||||
override async buildExecutableInFolder(key: CacheKey, dirPath: string): Promise<BuildResult> {
|
||||
const result = await super.buildExecutableInFolder(key, dirPath);
|
||||
|
||||
if (result.code === 0) {
|
||||
const execOptions = this.getDefaultExecOptions();
|
||||
execOptions.customCwd = dirPath;
|
||||
|
||||
await copyNeededDlls(
|
||||
dirPath,
|
||||
result.executableFilename,
|
||||
this.exec.bind(this),
|
||||
this.compiler.objdumper,
|
||||
execOptions,
|
||||
);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,3 +43,4 @@ export {TestingTool} from './testing-tool.js';
|
||||
export {BloatyTool} from './bloaty-tool.js';
|
||||
export {ClippyTool} from './clippy-tool.js';
|
||||
export {BrontoRefactorTool} from './bronto-refactor-tool.js';
|
||||
export {MiriTool} from './miri-tool.js';
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
// Copyright (c) 2025, Compiler Explorer Authors
|
||||
// All rights reserved.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above copyright
|
||||
// notice, this list of conditions and the following disclaimer in the
|
||||
// documentation and/or other materials provided with the distribution.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import type {ResultLine} from '../../types/resultline/resultline.interfaces.js';
|
||||
import {parseRustOutput} from '../utils.js';
|
||||
|
||||
import {BaseTool} from './base-tool.js';
|
||||
|
||||
export class MiriTool extends BaseTool {
|
||||
static get key() {
|
||||
return 'miri-tool';
|
||||
}
|
||||
|
||||
override parseOutput(lines: string, inputFilename?: string, pathPrefix?: string): ResultLine[] {
|
||||
return parseRustOutput(lines, inputFilename, pathPrefix);
|
||||
}
|
||||
}
|
||||
+14
-7
@@ -613,23 +613,30 @@ function start() {
|
||||
|
||||
let layout: GoldenLayout;
|
||||
let hub: Hub;
|
||||
let themer: Themer;
|
||||
let settings: SiteSettings;
|
||||
|
||||
function initializeLayout(config: any, root: JQuery<HTMLElement>): [GoldenLayout, Hub, Themer, SiteSettings] {
|
||||
const layout = new GoldenLayout(config, root);
|
||||
const hub = new Hub(layout, subLangId, defaultLangId);
|
||||
const [themer, settings] = setupSettings(hub);
|
||||
hub.initLayout();
|
||||
return [layout, hub, themer, settings];
|
||||
}
|
||||
|
||||
try {
|
||||
layout = new GoldenLayout(config, root);
|
||||
hub = new Hub(layout, subLangId, defaultLangId);
|
||||
[layout, hub, themer, settings] = initializeLayout(config, root);
|
||||
} catch (e) {
|
||||
SentryCapture(e, 'goldenlayout/hub setup');
|
||||
console.log('Exception processing state, resetting layout to default', e);
|
||||
|
||||
if (document.URL.includes('/z/')) {
|
||||
document.location = document.URL.replace('/z/', '/resetlayout/');
|
||||
}
|
||||
|
||||
layout = new GoldenLayout(defaultConfig, root);
|
||||
hub = new Hub(layout, subLangId, defaultLangId);
|
||||
[layout, hub, themer, settings] = initializeLayout(defaultConfig, root);
|
||||
}
|
||||
|
||||
const [themer, settings] = setupSettings(hub);
|
||||
hub.initLayout();
|
||||
|
||||
setSentryLayout(layout);
|
||||
|
||||
if (hub.hasTree()) {
|
||||
|
||||
+11
-16
@@ -61,22 +61,17 @@ const stringifyKeysInOrder = (data: any): string => {
|
||||
|
||||
function testFilter(filename: string, suffix: string, filters: ParseFiltersAndOutputOptions) {
|
||||
const testName = path.basename(filename + suffix);
|
||||
it(
|
||||
testName,
|
||||
// Bump the timeout a bit so that we don't fail for slow cases
|
||||
{timeout: 10000},
|
||||
async () => {
|
||||
const result = processAsm(filename, filters);
|
||||
delete result.parsingTime;
|
||||
delete result.filteredCount;
|
||||
// TODO normalize line endings?
|
||||
await expect(stringifyKeysInOrder(result)).toMatchFileSnapshot(path.join(casesRoot, testName + '.json'));
|
||||
},
|
||||
);
|
||||
it(testName, async () => {
|
||||
const result = processAsm(filename, filters);
|
||||
delete result.parsingTime;
|
||||
delete result.filteredCount;
|
||||
// TODO normalize line endings?
|
||||
await expect(stringifyKeysInOrder(result)).toMatchFileSnapshot(path.join(casesRoot, testName + '.json'));
|
||||
}, 10000); // Bump the timeout a bit so that we don't fail for slow cases
|
||||
}
|
||||
|
||||
describe('Filter test cases', () => {
|
||||
if (process.platform === 'win32') {
|
||||
if (process.platform === 'win32' || process.platform === 'darwin') {
|
||||
it('should skip filter-tests on Windows', () => {
|
||||
expect(true).toBe(true);
|
||||
});
|
||||
@@ -98,7 +93,7 @@ describe('Filter test cases', () => {
|
||||
}
|
||||
});
|
||||
describe('Binary, directives, labels and comments', () => {
|
||||
if (process.platform !== 'win32') {
|
||||
if (process.platform !== 'win32' && process.platform !== 'darwin') {
|
||||
for (const x of cases) {
|
||||
testFilter(x, '.binary.directives.labels.comments', {
|
||||
binary: true,
|
||||
@@ -110,7 +105,7 @@ describe('Filter test cases', () => {
|
||||
}
|
||||
});
|
||||
describe('Binary, directives, labels, comments and library code', () => {
|
||||
if (process.platform !== 'win32') {
|
||||
if (process.platform !== 'win32' && process.platform !== 'darwin') {
|
||||
for (const x of cases) {
|
||||
if (!x.endsWith('-bin.asm')) continue;
|
||||
|
||||
@@ -125,7 +120,7 @@ describe('Filter test cases', () => {
|
||||
}
|
||||
});
|
||||
describe('Binary, directives, labels, comments and library code with dontMaskFilenames', () => {
|
||||
if (process.platform !== 'win32') {
|
||||
if (process.platform !== 'win32' && process.platform !== 'darwin') {
|
||||
for (const x of cases) {
|
||||
if (!x.endsWith('-bin.asm')) continue;
|
||||
|
||||
|
||||
+20
-28
@@ -36,40 +36,32 @@ async function writeTestFile(filepath) {
|
||||
}
|
||||
|
||||
describe('Packager', () => {
|
||||
it(
|
||||
'should be able to package 1 file',
|
||||
async () => {
|
||||
const pack = new Packager();
|
||||
it('should be able to package 1 file', async () => {
|
||||
const pack = new Packager();
|
||||
|
||||
const dirPath = newTempDir();
|
||||
await writeTestFile(path.join(dirPath, 'hello.txt'));
|
||||
const dirPath = newTempDir();
|
||||
await writeTestFile(path.join(dirPath, 'hello.txt'));
|
||||
|
||||
const targzPath = path.join(dirPath, 'package.tgz');
|
||||
await pack.package(dirPath, targzPath);
|
||||
const targzPath = path.join(dirPath, 'package.tgz');
|
||||
await pack.package(dirPath, targzPath);
|
||||
|
||||
await expect(fs.stat(targzPath)).resolves.toBeDefined();
|
||||
},
|
||||
{timeout: 5000},
|
||||
);
|
||||
await expect(fs.stat(targzPath)).resolves.toBeDefined();
|
||||
}, 5000);
|
||||
|
||||
it(
|
||||
'should be able to unpack',
|
||||
async () => {
|
||||
const pack = new Packager();
|
||||
it('should be able to unpack', async () => {
|
||||
const pack = new Packager();
|
||||
|
||||
const dirPath = newTempDir();
|
||||
await writeTestFile(path.join(dirPath, 'hello.txt'));
|
||||
const dirPath = newTempDir();
|
||||
await writeTestFile(path.join(dirPath, 'hello.txt'));
|
||||
|
||||
const targzPath = path.join(dirPath, 'package.tgz');
|
||||
await pack.package(dirPath, targzPath);
|
||||
const targzPath = path.join(dirPath, 'package.tgz');
|
||||
await pack.package(dirPath, targzPath);
|
||||
|
||||
const unpackPath = newTempDir();
|
||||
const pack2 = new Packager();
|
||||
await pack2.unpack(targzPath, unpackPath);
|
||||
const unpackPath = newTempDir();
|
||||
const pack2 = new Packager();
|
||||
await pack2.unpack(targzPath, unpackPath);
|
||||
|
||||
const unpackedFilepath = path.join(unpackPath, 'hello.txt');
|
||||
await expect(fs.stat(unpackedFilepath)).resolves.toBeDefined;
|
||||
},
|
||||
{timeout: 5000},
|
||||
);
|
||||
const unpackedFilepath = path.join(unpackPath, 'hello.txt');
|
||||
await expect(fs.stat(unpackedFilepath)).resolves.toBeDefined;
|
||||
}, 5000);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user