Merge autoland to mozilla-central. a=merge

This commit is contained in:
Iulian Moraru 2023-09-22 12:20:44 +03:00
Родитель fd53deacfc aac4cc951f
Коммит 49d63b61ac
27 изменённых файлов: 568 добавлений и 85 удалений

Просмотреть файл

@ -1,5 +0,0 @@
{
"cc": "/usr/bin/gcc",
"cxx": "/usr/bin/g++",
"as": "/usr/bin/gcc"
}

Просмотреть файл

@ -0,0 +1,9 @@
{
"cc": "/usr/bin/gcc",
"cxx": "/usr/bin/g++",
"as": "/usr/bin/gcc",
"targets": "X86;WebAssembly",
"patches": [
"llvmorg-10-init-136-gb288d90b39f4.patch"
]
}

Просмотреть файл

@ -0,0 +1,37 @@
From 79e6696d121b978b4482ce74119c6bbc7a9ce30f Mon Sep 17 00:00:00 2001
From: Than McIntosh <thanm@google.com>
Date: Fri, 19 Jul 2019 13:13:54 +0000
Subject: [PATCH] [NFC] include cstdint/string prior to using uint8_t/string
Summary: include proper header prior to use of uint8_t typedef
and std::string.
Subscribers: llvm-commits
Reviewers: cherry
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64937
llvm-svn: 366572
---
llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h b/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h
index 9e3478e9fd29..efd55339418b 100644
--- a/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h
+++ b/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h
@@ -4,6 +4,8 @@
#include "llvm/Demangle/Compiler.h"
#include "llvm/Demangle/StringView.h"
#include <array>
+#include <cstdint>
+#include <string>
class OutputStream;
--
2.41.0.3.g1cb8d410ac

Просмотреть файл

@ -1414,9 +1414,9 @@ def compiler(
# If you want to bump the version check here ensure the version # If you want to bump the version check here ensure the version
# is known for Xcode in get_compiler_info. # is known for Xcode in get_compiler_info.
if info.type == "clang" and info.version < "7.0": if info.type == "clang" and info.version < "8.0":
raise FatalCheckError( raise FatalCheckError(
"Only clang/llvm 7.0 or newer is supported (found version %s)." "Only clang/llvm 8.0 or newer is supported (found version %s)."
% info.version % info.version
) )

Просмотреть файл

@ -16,7 +16,7 @@ test-array$(DLL_SUFFIX) test-ctors$(DLL_SUFFIX): %$(DLL_SUFFIX): %.$(OBJ_SUFFIX)
@echo === Use --disable-elf-hack until this is fixed. @echo === Use --disable-elf-hack until this is fixed.
@echo === @echo ===
# Fail if the library doesn't have $(DT_TYPE) .dynamic info # Fail if the library doesn't have $(DT_TYPE) .dynamic info
$(READELF) -d $@ | grep '($(DT_TYPE))' $(READELF) -d $@ | grep '\b$(DT_TYPE)\b'
@rm -f $@.bak @rm -f $@.bak
$(CURDIR)/elfhack -b -f $@ $(CURDIR)/elfhack -b -f $@
# Fail if the backup file doesn't exist # Fail if the backup file doesn't exist

Просмотреть файл

@ -180,6 +180,12 @@ bool RelR<bits>::hack(std::fstream& f) {
return false; return false;
} }
// Apply the PT_DYNAMIC tag changes we've recorded.
for (const auto& [offset, tag] : relr_tags) {
f.seekg(offset, std::ios::beg);
f.write(reinterpret_cast<const char*>(&tag), sizeof(tag));
}
if (verneednum && verneed_off && strsz && strtab_off) { if (verneednum && verneed_off && strsz && strtab_off) {
// Scan SHT_VERNEED for the GLIBC_ABI_DT_RELR version on the libc // Scan SHT_VERNEED for the GLIBC_ABI_DT_RELR version on the libc
// library. // library.
@ -220,10 +226,6 @@ bool RelR<bits>::hack(std::fstream& f) {
// Don't overwrite vn_aux. // Don't overwrite vn_aux.
f.write(reinterpret_cast<char*>(&reuse), f.write(reinterpret_cast<char*>(&reuse),
sizeof(reuse) - sizeof(Elf_Word)); sizeof(reuse) - sizeof(Elf_Word));
for (const auto& [offset, tag] : relr_tags) {
f.seekg(offset, std::ios::beg);
f.write(reinterpret_cast<const char*>(&tag), sizeof(tag));
}
} }
} }
verneed_off += verneed.vn_next; verneed_off += verneed.vn_next;

Просмотреть файл

@ -44,7 +44,7 @@ list of acceptable features is given below:
- -
* - Current minimal requirement * - Current minimal requirement
- 8.1 - 8.1
- 7.0 - 8.0
- -
* - Feature * - Feature
- GCC - GCC

Просмотреть файл

@ -94,22 +94,57 @@ AudioTimelineEvent::~AudioTimelineEvent() {
} }
} }
template <class TimeType>
float AudioEventTimeline::ComputeSetTargetStartValue(
const AudioTimelineEvent* aPreviousEvent, TimeType aTime) {
mSetTargetStartTime = aTime;
mSetTargetStartValue =
GetValuesAtTimeHelperInternal(aTime, aPreviousEvent, nullptr);
return mSetTargetStartValue;
}
template void AudioEventTimeline::CleanupEventsOlderThan(double); template void AudioEventTimeline::CleanupEventsOlderThan(double);
template void AudioEventTimeline::CleanupEventsOlderThan(int64_t); template void AudioEventTimeline::CleanupEventsOlderThan(int64_t);
template <class TimeType> template <class TimeType>
void AudioEventTimeline::CleanupEventsOlderThan(TimeType aTime) { void AudioEventTimeline::CleanupEventsOlderThan(TimeType aTime) {
while (mEvents.Length() > 1 && aTime > mEvents[1].Time<TimeType>()) { auto TimeOf =
if (mEvents[1].mType == AudioTimelineEvent::SetTarget) { [](const decltype(mEvents)::const_iterator& aEvent) -> TimeType {
mSetTargetStartValue = GetValuesAtTimeHelperInternal( return aEvent->Time<TimeType>();
mEvents[1].Time<TimeType>(), &mEvents[0], nullptr); };
}
MOZ_ASSERT(!mEvents[0].mTrack, // Find first event to keep. Keep one event prior to aTime.
auto begin = mEvents.cbegin();
auto end = mEvents.cend();
auto event = begin + 1;
for (; event < end && aTime > TimeOf(event); ++event) {
MOZ_ASSERT(!(event - 1)->mTrack,
"AudioParam tracks should never be destroyed on the real-time " "AudioParam tracks should never be destroyed on the real-time "
"thread."); "thread.");
JS::AutoSuppressGCAnalysis suppress;
mEvents.RemoveElementAt(0);
} }
auto firstToKeep = event - 1;
if (firstToKeep == begin) {
return;
}
// If the firstToKeep event is a SetTarget, then set its initial value if
// not already set. First find the most recent event where the value at the
// end time of the event is known, either from the event or for SetTarget
// events because it has already been calculated. This may not have been
// calculated if GetValuesAtTime() was not called for the start time of the
// SetTarget event.
for (event = firstToKeep;
event > begin && event->mType == AudioTimelineEvent::SetTarget &&
TimeOf(event) > mSetTargetStartTime.Get<TimeType>();
--event) {
}
// Compute SetTarget start times.
for (; event < firstToKeep; ++event) {
MOZ_ASSERT((event + 1)->mType == AudioTimelineEvent::SetTarget);
ComputeSetTargetStartValue(&*event, TimeOf(event + 1));
}
JS::AutoSuppressGCAnalysis suppress; // for null mTrack
mEvents.RemoveElementsRange(begin, firstToKeep);
} }
// This method computes the AudioParam value at a given time based on the event // This method computes the AudioParam value at a given time based on the event
@ -184,9 +219,7 @@ float AudioEventTimeline::GetValueAtTimeOfEvent(
switch (aEvent->mType) { switch (aEvent->mType) {
case AudioTimelineEvent::SetTarget: case AudioTimelineEvent::SetTarget:
// Start the curve, from the last value of the previous event. // Start the curve, from the last value of the previous event.
mSetTargetStartValue = return ComputeSetTargetStartValue(aPrevious, time);
GetValuesAtTimeHelperInternal(time, aPrevious, nullptr);
return mSetTargetStartValue;
case AudioTimelineEvent::SetValueCurve: case AudioTimelineEvent::SetValueCurve:
// SetValueCurve events can be handled no matter what their event // SetValueCurve events can be handled no matter what their event
// node is (if they have one) // node is (if they have one)

Просмотреть файл

@ -403,6 +403,10 @@ class AudioEventTimeline {
static bool IsValid(double value) { return std::isfinite(value); } static bool IsValid(double value) { return std::isfinite(value); }
template <class TimeType>
float ComputeSetTargetStartValue(const AudioTimelineEvent* aPreviousEvent,
TimeType aTime);
// This is a sorted array of the events in the timeline. Queries of this // This is a sorted array of the events in the timeline. Queries of this
// data structure should probably be more frequent than modifications to it, // data structure should probably be more frequent than modifications to it,
// and that is the reason why we're using a simple array as the data // and that is the reason why we're using a simple array as the data
@ -413,6 +417,7 @@ class AudioEventTimeline {
// This is the value of this AudioParam at the end of the previous // This is the value of this AudioParam at the end of the previous
// event for SetTarget curves. // event for SetTarget curves.
float mSetTargetStartValue; float mSetTargetStartValue;
AudioTimelineEvent::TimeUnion mSetTargetStartTime;
}; };
} // namespace dom } // namespace dom

Просмотреть файл

@ -102,6 +102,7 @@ if os_bsd:
if os_linux: if os_linux:
SOURCES += [ SOURCES += [
"src/base/process_util_linux.cc", "src/base/process_util_linux.cc",
"src/base/set_process_title_linux.cc",
"src/base/time_posix.cc", "src/base/time_posix.cc",
] ]
if CONFIG["OS_TARGET"] == "Android": if CONFIG["OS_TARGET"] == "Android":

Просмотреть файл

@ -27,6 +27,7 @@
# include "mozilla/Unused.h" # include "mozilla/Unused.h"
# include "mozilla/ScopeExit.h" # include "mozilla/ScopeExit.h"
# include "mozilla/ipc/ProcessUtils.h" # include "mozilla/ipc/ProcessUtils.h"
# include "mozilla/ipc/SetProcessTitle.h"
using namespace mozilla::ipc; using namespace mozilla::ipc;
#endif #endif
@ -142,6 +143,7 @@ void AppProcessBuilder::ReplaceArguments(int* argcp, char*** argvp) {
*p = nullptr; *p = nullptr;
*argvp = argv; *argvp = argv;
*argcp = argv_.size(); *argcp = argv_.size();
mozilla::SetProcessTitle(argv_);
} }
void AppProcessBuilder::InitAppProcess(int* argcp, char*** argvp) { void AppProcessBuilder::InitAppProcess(int* argcp, char*** argvp) {

Просмотреть файл

@ -0,0 +1,206 @@
// Copyright 2009 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file implements BSD-style setproctitle() for Linux.
// It is written such that it can easily be compiled outside Chromium.
//
// (This copy has been modified for use in the Mozilla codebase.)
//
// The Linux kernel sets up two locations in memory to pass arguments and
// environment variables to processes. First, there are two char* arrays stored
// one after another: argv and environ. A pointer to argv is passed to main(),
// while glibc sets the global variable |environ| to point at the latter. Both
// of these arrays are terminated by a null pointer; the environment array is
// also followed by some empty space to allow additional variables to be added.
//
// These arrays contain pointers to a second location in memory, where the
// strings themselves are stored one after another: first all the arguments,
// then the environment variables.
//
// When the kernel reads the command line arguments for a process, it looks at
// the range of memory that it initially used for the argument list. If the
// terminating '\0' character is still where it expects, nothing further is
// done. If it has been overwritten, the kernel will scan up to the size of
// a page looking for another.
//
// Thus to change the process title, we must move any arguments and environment
// variables out of the way to make room for a potentially longer title, and
// then overwrite the memory pointed to by argv[0] with a single replacement
// string, making sure its size does not exceed the available space.
//
// See the following kernel commit for the details of the contract between
// kernel and setproctitle:
// https://github.com/torvalds/linux/commit/2954152298c37804dab49d630aa959625b50cf64
//
// It is perhaps worth noting that patches to add a system call to Linux for
// this, like in BSD, have never made it in: this is the "official" way to do
// this on Linux. Presumably it is not in glibc due to some disagreement over
// this position within the glibc project, leaving applications caught in the
// middle. (Also, only a very few applications need or want this anyway.)
#include "base/set_process_title_linux.h"
#include "mozilla/UniquePtrExtensions.h"
#include <fcntl.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <string>
#include <vector>
extern char** environ;
// g_orig_argv0 is the original process name found in argv[0].
// It is set to a copy of argv[0] in setproctitle_init. It is nullptr if
// setproctitle_init was unsuccessful or not called.
static const char* g_orig_argv0 = nullptr;
// Following pointers hold the initial argv/envp memory range.
// They are initialized in setproctitle_init and are used to overwrite the
// argv/envp memory range with a new process title to be read by the kernel.
// They are nullptr if setproctitle_init was unsuccessful or not called.
// Note that g_envp_start is not necessary because it is the same as g_argv_end.
static char* g_argv_start = nullptr;
static char* g_argv_end = nullptr;
static char* g_envp_end = nullptr;
void setproctitle(const char* fmt, ...) {
va_list ap;
// Sanity check before we try and set the process title.
// The BSD version allows a null fmt to restore the original title.
if (!g_orig_argv0 || !fmt) {
return;
}
// The title can be up to the end of envp.
const size_t avail_size = g_envp_end - g_argv_start - 1;
// Linux 4.18--5.2 have a bug where we can never set a process title
// shorter than the initial argv. Check if the bug exists in the current
// kernel on the first call of setproctitle.
static const bool buggy_kernel = [avail_size]() {
// Attempt to set an empty title. This will set cmdline to:
// "" (on Linux --4.17)
// "\0\0\0...\0\0\0.\0" (on Linux 4.18--5.2)
// "\0" (on Linux 5.3--)
memset(g_argv_start, 0, avail_size + 1);
g_argv_end[-1] = '.';
mozilla::UniqueFileHandle fd(
open("/proc/self/cmdline", O_RDONLY | O_CLOEXEC));
if (!fd) {
return false;
}
// We just want to see if there are at least 2 bytes in the file;
// we don't need to read the whole contents. Short reads probably
// aren't possible given how this procfs node is implemented, but
// it's not much more code to handle it anyway.
char buf[2];
ssize_t total_read = 0;
while (total_read < 2) {
ssize_t rd = read(fd.get(), buf, 2);
if (rd <= 0) {
return false;
}
total_read += rd;
}
return true;
}();
memset(g_argv_start, 0, avail_size + 1);
size_t size;
va_start(ap, fmt);
if (fmt[0] == '-') {
size = vsnprintf(g_argv_start, avail_size, &fmt[1], ap);
} else {
size = snprintf(g_argv_start, avail_size, "%s ", g_orig_argv0);
if (size < avail_size) {
size += vsnprintf(&g_argv_start[size], avail_size - size, fmt, ap);
}
}
va_end(ap);
// Kernel looks for a null terminator instead of the initial argv space
// when the end of the space is not terminated with a null.
// https://github.com/torvalds/linux/commit/d26d0cd97c88eb1a5704b42e41ab443406807810
//
// If the length of the new title is shorter than the original argv space,
// set the last byte of the space to an arbitrary non-null character to tell
// the kernel that setproctitle was called.
//
// On buggy kernels we can never make the process title shorter than the
// initial argv. In that case, just leave the remaining bytes filled with
// null characters.
const size_t argv_size = g_argv_end - g_argv_start - 1;
if (!buggy_kernel && size < argv_size) {
g_argv_end[-1] = '.';
}
}
// A version of this built into glibc would not need this function, since
// it could stash the argv pointer in __libc_start_main(). But we need it.
void setproctitle_init(char** main_argv) {
static bool init_called = false;
if (init_called) {
return;
}
init_called = true;
if (!main_argv) {
return;
}
// Verify that the memory layout matches expectation.
char** const argv = main_argv;
char* argv_start = argv[0];
char* p = argv_start;
for (size_t i = 0; argv[i]; ++i) {
if (p != argv[i]) {
return;
}
p += strlen(p) + 1;
}
char* argv_end = p;
size_t environ_size = 0;
for (size_t i = 0; environ[i]; ++i, ++environ_size) {
if (p != environ[i]) {
return;
}
p += strlen(p) + 1;
}
char* envp_end = p;
// Copy the arg and env strings into the heap. Leak Sanitizer
// doesn't seem to object to these strdup()s; if it ever does, we
// can always ensure the pointers are reachable from globals or add
// a suppresion for this function.
//
// Note that Chromium's version of this code didn't copy the
// arguments; this is probably because they access args via the
// CommandLine class, which copies into a std::vector<std::string>,
// but in general that's not a safe assumption for Gecko.
for (size_t i = 0; argv[i]; ++i) {
argv[i] = strdup(argv[i]);
}
for (size_t i = 0; environ[i]; ++i) {
environ[i] = strdup(environ[i]);
}
if (!argv[0]) {
return;
}
g_orig_argv0 = argv[0];
g_argv_start = argv_start;
g_argv_end = argv_end;
g_envp_end = envp_end;
}

Просмотреть файл

@ -0,0 +1,12 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef BASE_PROCESS_TITLE_LINUX_H_
#define BASE_PROCESS_TITLE_LINUX_H_
void setproctitle(const char* fmt, ...);
void setproctitle_init(char** main_argv);
#endif // BASE_PROCESS_TITLE_LINUX_H_

Просмотреть файл

@ -14,6 +14,7 @@
#include "mozilla/ipc/FileDescriptor.h" #include "mozilla/ipc/FileDescriptor.h"
#include "mozilla/ipc/IPDLParamTraits.h" #include "mozilla/ipc/IPDLParamTraits.h"
#include "mozilla/ipc/ProtocolMessageUtils.h" #include "mozilla/ipc/ProtocolMessageUtils.h"
#include "mozilla/ipc/SetProcessTitle.h"
#include "nsTraceRefcnt.h" #include "nsTraceRefcnt.h"
#include <fcntl.h> #include <fcntl.h>
@ -256,6 +257,8 @@ bool ForkServer::RunForkServer(int* aArgc, char*** aArgv) {
bool sleep_newproc = !!getenv("MOZ_FORKSERVER_WAIT_GDB_NEWPROC"); bool sleep_newproc = !!getenv("MOZ_FORKSERVER_WAIT_GDB_NEWPROC");
#endif #endif
SetProcessTitleInit(*aArgv);
// Do this before NS_LogInit() to avoid log files taking lower // Do this before NS_LogInit() to avoid log files taking lower
// FDs. // FDs.
ForkServer forkserver; ForkServer forkserver;

Просмотреть файл

@ -0,0 +1,51 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "mozilla/ipc/SetProcessTitle.h"
#include "nsString.h"
#ifdef XP_LINUX
# include "base/set_process_title_linux.h"
# define HAVE_SETPROCTITLE
# define HAVE_SETPROCTITLE_INIT
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \
defined(__DragonFly__)
# include <sys/types.h>
# include <unistd.h>
# define HAVE_SETPROCTITLE
#endif
namespace mozilla {
void SetProcessTitle(const std::vector<std::string>& aNewArgv) {
#ifdef HAVE_SETPROCTITLE
nsAutoCStringN<1024> buf;
bool firstArg = true;
for (const std::string& arg : aNewArgv) {
if (firstArg) {
firstArg = false;
} else {
buf.Append(' ');
}
buf.Append(arg.c_str());
}
setproctitle("-%s", buf.get());
#endif
}
void SetProcessTitleInit(char** aOrigArgv) {
#ifdef HAVE_SETPROCTITLE_INIT
setproctitle_init(aOrigArgv);
#endif
}
} // namespace mozilla

Просмотреть файл

@ -0,0 +1,19 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla_ipc_SetProcessTitle_h
#define mozilla_ipc_SetProcessTitle_h
#include <string>
#include <vector>
namespace mozilla {
void SetProcessTitle(const std::vector<std::string>& aNewArgv);
void SetProcessTitleInit(char** aOrigArgv);
} // namespace mozilla
#endif // mozilla_ipc_SetProcessTitle_h

Просмотреть файл

@ -125,9 +125,19 @@ else:
if CONFIG["OS_ARCH"] == "Linux": if CONFIG["OS_ARCH"] == "Linux":
UNIFIED_SOURCES += [ UNIFIED_SOURCES += [
"ProcessUtils_linux.cpp", "ProcessUtils_linux.cpp",
"SetProcessTitle.cpp",
]
EXPORTS.mozilla.ipc += [
"SetProcessTitle.h",
] ]
elif CONFIG["OS_ARCH"] in ("DragonFly", "FreeBSD", "NetBSD", "OpenBSD"): elif CONFIG["OS_ARCH"] in ("DragonFly", "FreeBSD", "NetBSD", "OpenBSD"):
UNIFIED_SOURCES += ["ProcessUtils_bsd.cpp"] UNIFIED_SOURCES += [
"ProcessUtils_bsd.cpp",
"SetProcessTitle.cpp",
]
EXPORTS.ipc += [
"SetProcessTitle.h",
]
elif CONFIG["OS_ARCH"] == "Darwin": elif CONFIG["OS_ARCH"] == "Darwin":
UNIFIED_SOURCES += ["ProcessUtils_mac.mm"] UNIFIED_SOURCES += ["ProcessUtils_mac.mm"]
else: else:

Просмотреть файл

@ -391,11 +391,7 @@ case "$target" in
*-*linux*) *-*linux*)
if test "$GNU_CC" -o "$GNU_CXX"; then if test "$GNU_CC" -o "$GNU_CXX"; then
MOZ_PGO_OPTIMIZE_FLAGS="-O3" MOZ_PGO_OPTIMIZE_FLAGS="-O3"
if test -n "$MOZ_DEBUG"; then MOZ_OPTIMIZE_FLAGS="-O2"
MOZ_OPTIMIZE_FLAGS="-Os"
else
MOZ_OPTIMIZE_FLAGS="-O2"
fi
if test -z "$CLANG_CC"; then if test -z "$CLANG_CC"; then
MOZ_OPTIMIZE_FLAGS="-freorder-blocks $MOZ_OPTIMIZE_FLAGS" MOZ_OPTIMIZE_FLAGS="-freorder-blocks $MOZ_OPTIMIZE_FLAGS"
fi fi

Просмотреть файл

@ -173,8 +173,8 @@ CLANG_3_3 = CLANG("3.3.0") + DEFAULT_C99
CLANGXX_3_3 = CLANGXX("3.3.0") CLANGXX_3_3 = CLANGXX("3.3.0")
CLANG_4_0 = CLANG("4.0.2") + DEFAULT_C11 CLANG_4_0 = CLANG("4.0.2") + DEFAULT_C11
CLANGXX_4_0 = CLANGXX("4.0.2") + SUPPORTS_GNUXX1Z CLANGXX_4_0 = CLANGXX("4.0.2") + SUPPORTS_GNUXX1Z
CLANG_7_0 = CLANG("7.0.0") + DEFAULT_C11 CLANG_8_0 = CLANG("8.0.0") + DEFAULT_C11
CLANGXX_7_0 = CLANGXX("7.0.0") + DEFAULT_CXX_14 + SUPPORTS_GNUXX17 CLANGXX_8_0 = CLANGXX("8.0.0") + DEFAULT_CXX_14 + SUPPORTS_GNUXX17
XCODE_CLANG_3_3 = ( XCODE_CLANG_3_3 = (
CLANG("5.0") CLANG("5.0")
+ DEFAULT_C99 + DEFAULT_C99
@ -188,12 +188,12 @@ XCODE_CLANG_4_0 = CLANG("9.0.0") + DEFAULT_C11 + {"__apple_build_version__": "1"
XCODE_CLANGXX_4_0 = ( XCODE_CLANGXX_4_0 = (
CLANGXX("9.0.0") + SUPPORTS_GNUXX1Z + {"__apple_build_version__": "1"} CLANGXX("9.0.0") + SUPPORTS_GNUXX1Z + {"__apple_build_version__": "1"}
) )
XCODE_CLANG_7_0 = CLANG("10.0.1") + DEFAULT_C11 + {"__apple_build_version__": "1"} XCODE_CLANG_8_0 = CLANG("11.0.1") + DEFAULT_C11 + {"__apple_build_version__": "1"}
XCODE_CLANGXX_7_0 = ( XCODE_CLANGXX_8_0 = (
CLANGXX("10.0.1") + SUPPORTS_GNUXX17 + {"__apple_build_version__": "1"} CLANGXX("11.0.1") + SUPPORTS_GNUXX17 + {"__apple_build_version__": "1"}
) )
DEFAULT_CLANG = CLANG_7_0 DEFAULT_CLANG = CLANG_8_0
DEFAULT_CLANGXX = CLANGXX_7_0 DEFAULT_CLANGXX = CLANGXX_8_0
def CLANG_PLATFORM(gcc_platform): def CLANG_PLATFORM(gcc_platform):
@ -445,8 +445,8 @@ class LinuxToolchainTest(BaseToolchainTest):
"/usr/bin/g++-10": GXX_10 + GCC_PLATFORM_X86_64_LINUX, "/usr/bin/g++-10": GXX_10 + GCC_PLATFORM_X86_64_LINUX,
"/usr/bin/clang": DEFAULT_CLANG + CLANG_PLATFORM_X86_64_LINUX, "/usr/bin/clang": DEFAULT_CLANG + CLANG_PLATFORM_X86_64_LINUX,
"/usr/bin/clang++": DEFAULT_CLANGXX + CLANG_PLATFORM_X86_64_LINUX, "/usr/bin/clang++": DEFAULT_CLANGXX + CLANG_PLATFORM_X86_64_LINUX,
"/usr/bin/clang-7.0": CLANG_7_0 + CLANG_PLATFORM_X86_64_LINUX, "/usr/bin/clang-8.0": CLANG_8_0 + CLANG_PLATFORM_X86_64_LINUX,
"/usr/bin/clang++-7.0": CLANGXX_7_0 + CLANG_PLATFORM_X86_64_LINUX, "/usr/bin/clang++-8.0": CLANGXX_8_0 + CLANG_PLATFORM_X86_64_LINUX,
"/usr/bin/clang-4.0": CLANG_4_0 + CLANG_PLATFORM_X86_64_LINUX, "/usr/bin/clang-4.0": CLANG_4_0 + CLANG_PLATFORM_X86_64_LINUX,
"/usr/bin/clang++-4.0": CLANGXX_4_0 + CLANG_PLATFORM_X86_64_LINUX, "/usr/bin/clang++-4.0": CLANGXX_4_0 + CLANG_PLATFORM_X86_64_LINUX,
"/usr/bin/clang-3.3": CLANG_3_3 + CLANG_PLATFORM_X86_64_LINUX, "/usr/bin/clang-3.3": CLANG_3_3 + CLANG_PLATFORM_X86_64_LINUX,
@ -481,33 +481,33 @@ class LinuxToolchainTest(BaseToolchainTest):
DEFAULT_GXX_RESULT = GXX_8_RESULT + {"compiler": "/usr/bin/g++"} DEFAULT_GXX_RESULT = GXX_8_RESULT + {"compiler": "/usr/bin/g++"}
CLANG_3_3_RESULT = ( CLANG_3_3_RESULT = (
"Only clang/llvm 7.0 or newer is supported (found version 3.3.0)." "Only clang/llvm 8.0 or newer is supported (found version 3.3.0)."
) )
CLANGXX_3_3_RESULT = ( CLANGXX_3_3_RESULT = (
"Only clang/llvm 7.0 or newer is supported (found version 3.3.0)." "Only clang/llvm 8.0 or newer is supported (found version 3.3.0)."
) )
CLANG_4_0_RESULT = ( CLANG_4_0_RESULT = (
"Only clang/llvm 7.0 or newer is supported (found version 4.0.2)." "Only clang/llvm 8.0 or newer is supported (found version 4.0.2)."
) )
CLANGXX_4_0_RESULT = ( CLANGXX_4_0_RESULT = (
"Only clang/llvm 7.0 or newer is supported (found version 4.0.2)." "Only clang/llvm 8.0 or newer is supported (found version 4.0.2)."
) )
CLANG_7_0_RESULT = CompilerResult( CLANG_8_0_RESULT = CompilerResult(
flags=["-std=gnu99"], flags=["-std=gnu99"],
version="7.0.0", version="8.0.0",
type="clang", type="clang",
compiler="/usr/bin/clang-7.0", compiler="/usr/bin/clang-8.0",
language="C", language="C",
) )
CLANGXX_7_0_RESULT = CompilerResult( CLANGXX_8_0_RESULT = CompilerResult(
flags=["-std=gnu++17"], flags=["-std=gnu++17"],
version="7.0.0", version="8.0.0",
type="clang", type="clang",
compiler="/usr/bin/clang++-7.0", compiler="/usr/bin/clang++-8.0",
language="C++", language="C++",
) )
DEFAULT_CLANG_RESULT = CLANG_7_0_RESULT + {"compiler": "/usr/bin/clang"} DEFAULT_CLANG_RESULT = CLANG_8_0_RESULT + {"compiler": "/usr/bin/clang"}
DEFAULT_CLANGXX_RESULT = CLANGXX_7_0_RESULT + {"compiler": "/usr/bin/clang++"} DEFAULT_CLANGXX_RESULT = CLANGXX_8_0_RESULT + {"compiler": "/usr/bin/clang++"}
def test_default(self): def test_default(self):
# We'll try clang and gcc, and find clang first. # We'll try clang and gcc, and find clang first.
@ -657,10 +657,10 @@ class LinuxToolchainTest(BaseToolchainTest):
self.do_toolchain_test( self.do_toolchain_test(
self.PATHS, self.PATHS,
{ {
"c_compiler": self.CLANG_7_0_RESULT, "c_compiler": self.CLANG_8_0_RESULT,
"cxx_compiler": self.CLANGXX_7_0_RESULT, "cxx_compiler": self.CLANGXX_8_0_RESULT,
}, },
environ={"CC": "clang-7.0"}, environ={"CC": "clang-8.0"},
) )
def test_unsupported_clang(self): def test_unsupported_clang(self):
@ -845,8 +845,8 @@ class OSXToolchainTest(BaseToolchainTest):
"/usr/bin/g++-5": GXX_5 + GCC_PLATFORM_X86_64_OSX, "/usr/bin/g++-5": GXX_5 + GCC_PLATFORM_X86_64_OSX,
"/usr/bin/gcc-8": GCC_8 + GCC_PLATFORM_X86_64_OSX, "/usr/bin/gcc-8": GCC_8 + GCC_PLATFORM_X86_64_OSX,
"/usr/bin/g++-8": GXX_8 + GCC_PLATFORM_X86_64_OSX, "/usr/bin/g++-8": GXX_8 + GCC_PLATFORM_X86_64_OSX,
"/usr/bin/clang": XCODE_CLANG_7_0 + CLANG_PLATFORM_X86_64_OSX, "/usr/bin/clang": XCODE_CLANG_8_0 + CLANG_PLATFORM_X86_64_OSX,
"/usr/bin/clang++": XCODE_CLANGXX_7_0 + CLANG_PLATFORM_X86_64_OSX, "/usr/bin/clang++": XCODE_CLANGXX_8_0 + CLANG_PLATFORM_X86_64_OSX,
"/usr/bin/clang-4.0": XCODE_CLANG_4_0 + CLANG_PLATFORM_X86_64_OSX, "/usr/bin/clang-4.0": XCODE_CLANG_4_0 + CLANG_PLATFORM_X86_64_OSX,
"/usr/bin/clang++-4.0": XCODE_CLANGXX_4_0 + CLANG_PLATFORM_X86_64_OSX, "/usr/bin/clang++-4.0": XCODE_CLANGXX_4_0 + CLANG_PLATFORM_X86_64_OSX,
"/usr/bin/clang-3.3": XCODE_CLANG_3_3 + CLANG_PLATFORM_X86_64_OSX, "/usr/bin/clang-3.3": XCODE_CLANG_3_3 + CLANG_PLATFORM_X86_64_OSX,
@ -854,27 +854,27 @@ class OSXToolchainTest(BaseToolchainTest):
"/usr/bin/xcrun": xcrun, "/usr/bin/xcrun": xcrun,
} }
CLANG_3_3_RESULT = ( CLANG_3_3_RESULT = (
"Only clang/llvm 7.0 or newer is supported (found version 4.0.0.or.less)." "Only clang/llvm 8.0 or newer is supported (found version 4.0.0.or.less)."
) )
CLANGXX_3_3_RESULT = ( CLANGXX_3_3_RESULT = (
"Only clang/llvm 7.0 or newer is supported (found version 4.0.0.or.less)." "Only clang/llvm 8.0 or newer is supported (found version 4.0.0.or.less)."
) )
CLANG_4_0_RESULT = ( CLANG_4_0_RESULT = (
"Only clang/llvm 7.0 or newer is supported (found version 4.0.0.or.less)." "Only clang/llvm 8.0 or newer is supported (found version 4.0.0.or.less)."
) )
CLANGXX_4_0_RESULT = ( CLANGXX_4_0_RESULT = (
"Only clang/llvm 7.0 or newer is supported (found version 4.0.0.or.less)." "Only clang/llvm 8.0 or newer is supported (found version 4.0.0.or.less)."
) )
DEFAULT_CLANG_RESULT = CompilerResult( DEFAULT_CLANG_RESULT = CompilerResult(
flags=["-std=gnu99"], flags=["-std=gnu99"],
version="7.0.0", version="8.0.0",
type="clang", type="clang",
compiler="/usr/bin/clang", compiler="/usr/bin/clang",
language="C", language="C",
) )
DEFAULT_CLANGXX_RESULT = CompilerResult( DEFAULT_CLANGXX_RESULT = CompilerResult(
flags=["-stdlib=libc++", "-std=gnu++17"], flags=["-stdlib=libc++", "-std=gnu++17"],
version="7.0.0", version="8.0.0",
type="clang", type="clang",
compiler="/usr/bin/clang++", compiler="/usr/bin/clang++",
language="C++", language="C++",
@ -973,8 +973,8 @@ class MingwToolchainTest(BaseToolchainTest):
"/usr/bin/g++-7": GXX_7 + GCC_PLATFORM_X86_WIN + MINGW32, "/usr/bin/g++-7": GXX_7 + GCC_PLATFORM_X86_WIN + MINGW32,
"/usr/bin/clang": DEFAULT_CLANG + CLANG_PLATFORM_X86_WIN, "/usr/bin/clang": DEFAULT_CLANG + CLANG_PLATFORM_X86_WIN,
"/usr/bin/clang++": DEFAULT_CLANGXX + CLANG_PLATFORM_X86_WIN, "/usr/bin/clang++": DEFAULT_CLANGXX + CLANG_PLATFORM_X86_WIN,
"/usr/bin/clang-7.0": CLANG_7_0 + CLANG_PLATFORM_X86_WIN, "/usr/bin/clang-8.0": CLANG_8_0 + CLANG_PLATFORM_X86_WIN,
"/usr/bin/clang++-7.0": CLANGXX_7_0 + CLANG_PLATFORM_X86_WIN, "/usr/bin/clang++-8.0": CLANGXX_8_0 + CLANG_PLATFORM_X86_WIN,
"/usr/bin/clang-4.0": CLANG_4_0 + CLANG_PLATFORM_X86_WIN, "/usr/bin/clang-4.0": CLANG_4_0 + CLANG_PLATFORM_X86_WIN,
"/usr/bin/clang++-4.0": CLANGXX_4_0 + CLANG_PLATFORM_X86_WIN, "/usr/bin/clang++-4.0": CLANGXX_4_0 + CLANG_PLATFORM_X86_WIN,
"/usr/bin/clang-3.3": CLANG_3_3 + CLANG_PLATFORM_X86_WIN, "/usr/bin/clang-3.3": CLANG_3_3 + CLANG_PLATFORM_X86_WIN,
@ -1111,8 +1111,8 @@ class Mingw64ToolchainTest(MingwToolchainTest):
"/usr/bin/g++-7": GXX_7 + GCC_PLATFORM_X86_64_WIN + MINGW32, "/usr/bin/g++-7": GXX_7 + GCC_PLATFORM_X86_64_WIN + MINGW32,
"/usr/bin/clang": DEFAULT_CLANG + CLANG_PLATFORM_X86_64_WIN, "/usr/bin/clang": DEFAULT_CLANG + CLANG_PLATFORM_X86_64_WIN,
"/usr/bin/clang++": DEFAULT_CLANGXX + CLANG_PLATFORM_X86_64_WIN, "/usr/bin/clang++": DEFAULT_CLANGXX + CLANG_PLATFORM_X86_64_WIN,
"/usr/bin/clang-7.0": CLANG_7_0 + CLANG_PLATFORM_X86_64_WIN, "/usr/bin/clang-8.0": CLANG_8_0 + CLANG_PLATFORM_X86_64_WIN,
"/usr/bin/clang++-7.0": CLANGXX_7_0 + CLANG_PLATFORM_X86_64_WIN, "/usr/bin/clang++-8.0": CLANGXX_8_0 + CLANG_PLATFORM_X86_64_WIN,
"/usr/bin/clang-4.0": CLANG_4_0 + CLANG_PLATFORM_X86_64_WIN, "/usr/bin/clang-4.0": CLANG_4_0 + CLANG_PLATFORM_X86_64_WIN,
"/usr/bin/clang++-4.0": CLANGXX_4_0 + CLANG_PLATFORM_X86_64_WIN, "/usr/bin/clang++-4.0": CLANGXX_4_0 + CLANG_PLATFORM_X86_64_WIN,
"/usr/bin/clang-3.3": CLANG_3_3 + CLANG_PLATFORM_X86_64_WIN, "/usr/bin/clang-3.3": CLANG_3_3 + CLANG_PLATFORM_X86_64_WIN,
@ -1561,20 +1561,20 @@ class OSXCrossToolchainTest(BaseToolchainTest):
PATHS = dict(LinuxToolchainTest.PATHS) PATHS = dict(LinuxToolchainTest.PATHS)
PATHS.update( PATHS.update(
{ {
"/usr/bin/clang": CLANG_7_0 + CLANG_PLATFORM_X86_64_LINUX, "/usr/bin/clang": CLANG_8_0 + CLANG_PLATFORM_X86_64_LINUX,
"/usr/bin/clang++": CLANGXX_7_0 + CLANG_PLATFORM_X86_64_LINUX, "/usr/bin/clang++": CLANGXX_8_0 + CLANG_PLATFORM_X86_64_LINUX,
} }
) )
DEFAULT_CLANG_RESULT = CompilerResult( DEFAULT_CLANG_RESULT = CompilerResult(
flags=["-std=gnu99"], flags=["-std=gnu99"],
version="7.0.0", version="8.0.0",
type="clang", type="clang",
compiler="/usr/bin/clang", compiler="/usr/bin/clang",
language="C", language="C",
) )
DEFAULT_CLANGXX_RESULT = CompilerResult( DEFAULT_CLANGXX_RESULT = CompilerResult(
flags=["-std=gnu++17"], flags=["-std=gnu++17"],
version="7.0.0", version="8.0.0",
type="clang", type="clang",
compiler="/usr/bin/clang++", compiler="/usr/bin/clang++",
language="C++", language="C++",

Просмотреть файл

@ -340,12 +340,12 @@ android-ndk-rs:
repo: https://github.com/jamienicol/android-ndk-rs repo: https://github.com/jamienicol/android-ndk-rs
revision: 595f4e14a78371e3ab59b12f7bd8131f2ec5b4a1 revision: 595f4e14a78371e3ab59b12f7bd8131f2ec5b4a1
clang-7.0: clang-8.0:
description: clang 7.0.0 source code description: clang 8.0.0 source code
fetch: fetch:
type: git type: git
repo: https://github.com/llvm/llvm-project repo: https://github.com/llvm/llvm-project
revision: 00b161b8971bc6d3cb55f13502288b8fe0dbaa42 revision: d2298e74235598f15594fe2c99bbac870a507c59
clang-14: clang-14:
description: clang 14.0.5 source code description: clang 14.0.5 source code
@ -388,6 +388,13 @@ rust-1.72.1:
repo: https://github.com/rust-lang/rust/ repo: https://github.com/rust-lang/rust/
revision: d5c2e9c342b358556da91d61ed4133f6f50fc0c3 revision: d5c2e9c342b358556da91d61ed4133f6f50fc0c3
wasi-sdk-11:
description: wasi-sdk-11 source code
fetch:
type: git
repo: https://github.com/WebAssembly/wasi-sdk
revision: ceabbfe181599bca83d81e087a229797e472c09c
wasi-sdk: wasi-sdk:
description: wasi-sdk-20 source code description: wasi-sdk-20 source code
fetch: fetch:

Просмотреть файл

@ -10,29 +10,44 @@ job-defaults:
resources: resources:
- 'build/build-clang/build-clang.py' - 'build/build-clang/build-clang.py'
linux64-clang-7.0: linux64-clang-8.0-raw:
description: "Clang 7.0 toolchain build" description: "Clang 8.0 toolchain build"
treeherder: treeherder:
symbol: TL(clang-7.0) symbol: TL(clang-8.0-raw)
worker-type: b-linux-large-gcp worker-type: b-linux-large-gcp
run: run:
script: build-clang.sh script: build-clang.sh
arguments: arguments:
- 'build/build-clang/linux64.json' - 'build/build-clang/linux64.json'
- 'build/build-clang/clang-7.0.json' - 'build/build-clang/clang-8.0.json'
- 'build/build-clang/2stages.json' - 'build/build-clang/2stages.json'
resources: resources:
- 'build/build-clang/linux64.json' - 'build/build-clang/linux64.json'
- 'build/build-clang/clang-7.0.json' - 'build/build-clang/clang-8.0.json'
- 'build/build-clang/2stages.json' - 'build/build-clang/2stages.json'
toolchain-artifact: public/build/clang.tar.zst toolchain-artifact: public/build/clang.tar.zst
toolchain-alias: linux64-clang-base
fetches: fetches:
fetch: fetch:
- clang-7.0 - clang-8.0
toolchain: toolchain:
- linux64-toolchain-sysroot - linux64-toolchain-sysroot
linux64-clang-8.0:
description: "Clang 8.0 toolchain build"
treeherder:
symbol: TL(clang-8.0)
worker-type: b-linux-gcp
worker:
max-run-time: 600
run:
script: repack-clang.sh
toolchain-alias: linux64-clang-base
toolchain-artifact: public/build/clang.tar.zst
fetches:
toolchain:
- linux64-clang-8.0-raw
- wasm32-wasi-compiler-rt-8.0
linux64-clang-14-stage1: linux64-clang-14-stage1:
description: "Clang 14 toolchain build" description: "Clang 14 toolchain build"
treeherder: treeherder:

Просмотреть файл

@ -10,6 +10,25 @@ job-defaults:
using: toolchain-script using: toolchain-script
script: build-compiler-rt.sh script: build-compiler-rt.sh
wasm32-wasi-compiler-rt-8.0:
description: "wasm32-wasi Compiler-rt for Clang 8 toolchain build"
treeherder:
symbol: TL(wasi-crt-8)
worker-type: b-linux-xlarge-gcp
run:
script: build-compiler-rt-wasi.sh
arguments:
- wasi-sdk-11.patch
resources:
- taskcluster/scripts/misc/wasi-sdk-11.patch
toolchain-artifact: public/build/compiler-rt-wasm32-wasi.tar.zst
fetches:
fetch:
- clang-8.0
- wasi-sdk-11
toolchain:
- linux64-clang-8.0-raw
android-aarch64-compiler-rt-16: android-aarch64-compiler-rt-16:
description: "android aarch64 Compiler-rt for Clang 16 toolchain build" description: "android aarch64 Compiler-rt for Clang 16 toolchain build"
treeherder: treeherder:
@ -429,6 +448,10 @@ wasm32-wasi-compiler-rt-17:
worker-type: b-linux-xlarge-gcp worker-type: b-linux-xlarge-gcp
run: run:
script: build-compiler-rt-wasi.sh script: build-compiler-rt-wasi.sh
arguments:
- wasi-sdk.patch
resources:
- taskcluster/scripts/misc/wasi-sdk.patch
toolchain-artifact: public/build/compiler-rt-wasm32-wasi.tar.zst toolchain-artifact: public/build/compiler-rt-wasm32-wasi.tar.zst
fetches: fetches:
fetch: fetch:
@ -666,6 +689,10 @@ wasm32-wasi-compiler-rt-trunk:
worker-type: b-linux-xlarge-gcp worker-type: b-linux-xlarge-gcp
run: run:
script: build-compiler-rt-wasi.sh script: build-compiler-rt-wasi.sh
arguments:
- wasi-sdk.patch
resources:
- taskcluster/scripts/misc/wasi-sdk.patch
toolchain-artifact: public/build/compiler-rt-wasm32-wasi.tar.zst toolchain-artifact: public/build/compiler-rt-wasm32-wasi.tar.zst
fetches: fetches:
fetch: fetch:

Просмотреть файл

@ -60,6 +60,23 @@ sysroot-x86_64-linux-gnu-x11:
arguments: arguments:
- amd64 - amd64
sysroot-wasm32-wasi-clang-8.0:
description: "Sysroot for wasi"
attributes:
local-toolchain: true
treeherder:
symbol: TL(sysroot-wasi-8)
run:
script: build-sysroot-wasi.sh
toolchain-artifact: public/build/sysroot-wasm32-wasi.tar.zst
fetches:
fetch:
- clang-8.0
- wasi-sdk-11
toolchain:
- linux64-clang-8.0
- wasm32-wasi-compiler-rt-8.0
sysroot-wasm32-wasi-clang-16: sysroot-wasm32-wasi-clang-16:
description: "Sysroot for wasi" description: "Sysroot for wasi"
attributes: attributes:
@ -89,6 +106,10 @@ sysroot-wasm32-wasi-clang-17:
symbol: TL(sysroot-wasi-17) symbol: TL(sysroot-wasi-17)
run: run:
script: build-sysroot-wasi.sh script: build-sysroot-wasi.sh
arguments:
- wasi-sdk.patch
resources:
- taskcluster/scripts/misc/wasi-sdk.patch
toolchain-artifact: public/build/sysroot-wasm32-wasi.tar.zst toolchain-artifact: public/build/sysroot-wasm32-wasi.tar.zst
fetches: fetches:
fetch: fetch:
@ -106,6 +127,10 @@ sysroot-wasm32-wasi-clang-trunk:
symbol: TL(sysroot-wasi-trunk) symbol: TL(sysroot-wasi-trunk)
run: run:
script: build-sysroot-wasi.sh script: build-sysroot-wasi.sh
arguments:
- wasi-sdk.patch
resources:
- taskcluster/scripts/misc/wasi-sdk.patch
toolchain-alias: toolchain-alias:
by-project: by-project:
toolchains: sysroot-wasm32-wasi toolchains: sysroot-wasm32-wasi

Просмотреть файл

@ -4,7 +4,9 @@ set -x -e -v
artifact=$(basename $TOOLCHAIN_ARTIFACT) artifact=$(basename $TOOLCHAIN_ARTIFACT)
dir=${artifact%.tar.*} dir=${artifact%.tar.*}
patch -d $MOZ_FETCHES_DIR/wasi-sdk -p1 < $(dirname $0)/wasi-sdk.patch if [ -n "$1" ]; then
patch -d $MOZ_FETCHES_DIR/wasi-sdk -p1 < $(dirname $0)/$1
fi
cd $MOZ_FETCHES_DIR/wasi-sdk cd $MOZ_FETCHES_DIR/wasi-sdk
LLVM_PROJ_DIR=$MOZ_FETCHES_DIR/llvm-project LLVM_PROJ_DIR=$MOZ_FETCHES_DIR/llvm-project
@ -23,7 +25,7 @@ ln -s llvm-ar build/install/wasi/bin/ar
# Build compiler-rt # Build compiler-rt
make \ make \
LLVM_PROJ_DIR=$LLVM_PROJ_DIR \ LLVM_PROJ_DIR=$LLVM_PROJ_DIR \
PREFIX=/wasi \ PREFIX=$(grep -q BUILD_PREFIX Makefile || echo $PWD/build/install)/wasi \
build/compiler-rt.BUILT \ build/compiler-rt.BUILT \
-j$(nproc) -j$(nproc)

Просмотреть файл

@ -7,7 +7,9 @@ sysroot=${artifact%.tar.*}
# Make the wasi compiler-rt available to clang. # Make the wasi compiler-rt available to clang.
env UPLOAD_DIR= $GECKO_PATH/taskcluster/scripts/misc/repack-clang.sh env UPLOAD_DIR= $GECKO_PATH/taskcluster/scripts/misc/repack-clang.sh
patch -d $MOZ_FETCHES_DIR/wasi-sdk -p1 < $(dirname $0)/wasi-sdk.patch if [ -n "$1" ]; then
patch -d $MOZ_FETCHES_DIR/wasi-sdk -p1 < $(dirname $0)/$1
fi
cd $MOZ_FETCHES_DIR/wasi-sdk cd $MOZ_FETCHES_DIR/wasi-sdk
LLVM_PROJ_DIR=$MOZ_FETCHES_DIR/llvm-project LLVM_PROJ_DIR=$MOZ_FETCHES_DIR/llvm-project
@ -27,7 +29,7 @@ ln -s llvm-ar build/install/wasi/bin/ar
do_make() { do_make() {
make \ make \
LLVM_PROJ_DIR=$LLVM_PROJ_DIR \ LLVM_PROJ_DIR=$LLVM_PROJ_DIR \
PREFIX=/wasi \ PREFIX=$(grep -q BUILD_PREFIX Makefile || echo $PWD/build/install)/wasi \
-j$(nproc) \ -j$(nproc) \
$1 $1
} }
@ -41,6 +43,9 @@ do_make build/wasi-libc.BUILT
touch build/compiler-rt.BUILT touch build/compiler-rt.BUILT
do_make build/libcxx.BUILT do_make build/libcxx.BUILT
if grep -q build/libcxxabi.BUILT Makefile; then
do_make build/libcxxabi.BUILT
fi
mv build/install/wasi/share/wasi-sysroot $sysroot mv build/install/wasi/share/wasi-sysroot $sysroot
tar --zstd -cf $artifact $sysroot tar --zstd -cf $artifact $sysroot

Просмотреть файл

@ -0,0 +1,14 @@
# https://github.com/WebAssembly/wasi-sdk/pull/189
diff --git a/Makefile b/Makefile
index bde9936..b1f24fe 100644
--- a/Makefile
+++ b/Makefile
@@ -91,7 +91,7 @@ build/wasi-libc.BUILT: build/llvm.BUILT
SYSROOT=$(BUILD_PREFIX)/share/wasi-sysroot
touch build/wasi-libc.BUILT
-build/compiler-rt.BUILT: build/llvm.BUILT
+build/compiler-rt.BUILT: build/llvm.BUILT build/wasi-libc.BUILT
# Do the build, and install it.
mkdir -p build/compiler-rt
cd build/compiler-rt && cmake -G Ninja \

Просмотреть файл

@ -53,10 +53,12 @@ promise_test(function() {
}, "setTargetAtTime() after setValueAtTime()"); }, "setTargetAtTime() after setValueAtTime()");
promise_test(async function() { promise_test(async function() {
const bufferSize = 128; const bufferSize = 129;
const sampleRate = 16384; const sampleRate = 16384;
const startSample1 = 125; const startSample1 = 125;
const target1 = Math.fround(-1./Math.expm1(-1.)); const target1 = Math.fround(-1./Math.expm1(-1.));
// Intentionally testing the second curve before and after the
// rendering quantum boundary.
const startSample2 = startSample1 + 1; const startSample2 = startSample1 + 1;
const target2 = 0.; const target2 = 0.;
const timeConstant = 1./sampleRate; const timeConstant = 1./sampleRate;
@ -88,5 +90,10 @@ promise_test(async function() {
Math.fround(output[startSample2] * Math.exp(-1.)), Math.fround(output[startSample2] * Math.exp(-1.)),
tolerance, tolerance,
"scheduled value at startSample2 + 1"); "scheduled value at startSample2 + 1");
assert_approx_equals(
output[startSample2 + 2],
Math.fround(output[startSample2] * Math.exp(-2.)),
tolerance,
"scheduled value at startSample2 + 2");
}, "setTargetAtTime() after setTargetAtTime()"); }, "setTargetAtTime() after setTargetAtTime()");
</script> </script>