diff options
author | 2023-06-03 00:36:05 -0400 | |
---|---|---|
committer | 2023-06-02 21:36:05 -0700 | |
commit | cfd73cec816cb73e0017cf306e133a7b0e5ae4eb (patch) | |
tree | b628d48e6962f9e71e3b9b75884f684d8297e180 /src/js/thirdparty/detect-libc.linux.js | |
parent | 3e437a6ae0d4a68f8f29c60276918d662ad7bbc7 (diff) | |
download | bun-cfd73cec816cb73e0017cf306e133a7b0e5ae4eb.tar.gz bun-cfd73cec816cb73e0017cf306e133a7b0e5ae4eb.tar.zst bun-cfd73cec816cb73e0017cf306e133a7b0e5ae4eb.zip |
fixes with hardcoded modules (#3182)
* fixes with hardcoded modules
* add make hardcoded to make dev
* adjust this message
* remove debugging logs
* this
* restore2
Diffstat (limited to 'src/js/thirdparty/detect-libc.linux.js')
-rw-r--r-- | src/js/thirdparty/detect-libc.linux.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/js/thirdparty/detect-libc.linux.js b/src/js/thirdparty/detect-libc.linux.js new file mode 100644 index 000000000..4c6557247 --- /dev/null +++ b/src/js/thirdparty/detect-libc.linux.js @@ -0,0 +1,35 @@ +// Hardcoded module "detect-libc" for linux +export function family() { + return Promise.resolve(familySync()); +} + +export function familySync() { + if (process.platform === "linux") { + return GLIBC; + } else { + return null; + } +} + +export const GLIBC = "glibc"; +export const MUSL = "musl"; + +export function versionAsync() { + return Promise.resolve(version()); +} + +export function version() { + if (process.platform === "linux") { + return "2.29"; + } else { + return null; + } +} + +export function isNonGlibcLinuxSync() { + return false; +} + +export function isNonGlibcLinux() { + return Promise.resolve(isNonGlibcLinuxSync()); +} |