-
-
Save Wowfunhappy/0fcc5f6aab77794e9decbd8e7f4d4469 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
solutions = [ | |
{ "name" : 'src', | |
"url" : 'https://github.com/Wowfunhappy/chromium-legacy.git', | |
"deps_file" : 'DEPS', | |
"managed" : False, | |
"custom_deps" : { | |
}, | |
"custom_vars": { | |
"checkout_pgo_profiles": True, | |
}, | |
}, | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clang_use_chrome_plugins=false | |
treat_warnings_as_errors=false | |
use_custom_libcxx = false | |
is_debug = false | |
is_component_build = false | |
is_official_build = true | |
symbol_level = 0 | |
enable_dsyms = false | |
enable_stripping = false | |
mac_deployment_target = "10.7" | |
mac_min_system_version = "10.7" | |
enable_nacl = false | |
media_use_ffmpeg = true | |
media_use_libvpx = true | |
proprietary_codecs = true | |
ffmpeg_branding = "Chrome" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir -pv chromium-project && cd chromium-project | |
mkdir -pv clang-master && pushd clang-master && curl -LOJ https://github.com/blueboxd/llvm-project/releases/download/main/main.tar.xz && tar xvf main.tar.xz | |
popd | |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git && export PATH=`pwd`/depot_tools:"$PATH" | |
mkdir -pv chromium-legacy && cd chromium-legacy | |
curl -OJ https://gist.githubusercontent.com/Wowfunhappy/0fcc5f6aab77794e9decbd8e7f4d4469/raw/dea92eae9afd416c74efccd94ee3688b1a8de76a/.gclient | |
gclient sync -v --no-history | |
pushd src/third_party/skia | |
git remote add for-lion https://github.com/Wowfunhappy/skia.git | |
git fetch for-lion && git checkout for-lion && git checkout for-lion -- . | |
popd | |
pushd src/v8/src | |
curl -OJ https://gist.githubusercontent.com/blueboxd/c1f355fb6fe829e98ff5453880683993/raw/97a23ba80d28005f6072053920d979be87213193/sp_mut.cc | |
cd ../ | |
cat BUILD.gn | sed -e 's#"src/wasm/wasm-code-manager.h",#"src/wasm/wasm-code-manager.h",\'$'\n "src/sp_mut.cc",#g' > BUILD.gn.tmp && mv -fv BUILD.gn.tmp BUILD.gn | |
popd | |
pushd src/third_party/angle/src/libANGLE/renderer/ | |
curl -OJ https://gist.githubusercontent.com/blueboxd/c1f355fb6fe829e98ff5453880683993/raw/65ba4558a17eb47feb38729a87b8d8976d5bb8ad/driver_utils_mac.mm | |
cd metal | |
cat BUILD.gn| sed -e 's#"QuartzCore.framework",#"QuartzCore.framework",\'$'\n "CoreServices.framework",#g' > BUILD.gn.tmp && mv -fv BUILD.gn.tmp BUILD.gn | |
popd | |
mkdir -pv out/release && pushd out/release | |
curl -OJ https://gist.githubusercontent.com/Wowfunhappy/0fcc5f6aab77794e9decbd8e7f4d4469/raw/26d7f50eece368c58fb4764cb43d9be0d4963e6e/args.gn | |
popd | |
pushd ../clang-master && echo "clang_base_path=\"`pwd`\"" >> ../chromium-legacy/out/release/args.gn | |
popd | |
cd src | |
gn gen ../out/release | |
time ninja -C ../out/release chrome | |
open -R ../out/release/Chromium.app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Copyright 2019 The ANGLE Project Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style license that can be | |
// found in the LICENSE file. | |
// | |
// driver_utils_mac.mm : provides mac-specific information about current driver. | |
#include "libANGLE/renderer/driver_utils.h" | |
#import <Foundation/Foundation.h> | |
namespace rx | |
{ | |
OSVersion GetMacOSVersion() | |
{ | |
OSVersion result; | |
if (@available(macOS 10.10, *)) { | |
NSOperatingSystemVersion version = [[NSProcessInfo processInfo] operatingSystemVersion]; | |
result.majorVersion = static_cast<int>(version.majorVersion); | |
result.minorVersion = static_cast<int>(version.minorVersion); | |
result.patchVersion = static_cast<int>(version.patchVersion); | |
} else { | |
extern OSErr Gestalt(OSType selector, SInt32 *response) __attribute__((weak_import, weak)); | |
::Gestalt(gestaltSystemVersionMajor, reinterpret_cast<SInt32*>(&result.majorVersion)); | |
::Gestalt(gestaltSystemVersionMinor, reinterpret_cast<SInt32*>(&result.minorVersion)); | |
::Gestalt(gestaltSystemVersionBugFix, reinterpret_cast<SInt32*>(&result.patchVersion)); | |
} | |
return result; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Append below to before NS_ASSUME_NONNULL_END of NSArray.h | |
@implementation NSArray (NSExtendedArray) | |
- (id) objectAtIndexedSubscript: (NSUInteger)index | |
{ | |
return [self objectAtIndex: index]; | |
} | |
@end | |
@implementation NSMutableArray (NSExtendedMutableArray) | |
- (void) setObject:(id)obj atIndexedSubscript:(NSUInteger)index{ | |
if (index < self.count){ | |
if (obj) | |
[self replaceObjectAtIndex:index withObject:obj]; | |
else | |
[self removeObjectAtIndex:index]; | |
} else { | |
[self addObject:obj]; | |
} | |
} | |
@end | |
API_AVAILABLE(macosx(10.15), ios(13.0), watchos(6.0), tvos(13.0)) | |
NS_SWIFT_UNAVAILABLE("NSMutableArray diffing methods are not available in Swift") | |
@interface NSMutableArray<ObjectType> (NSMutableArrayDiffing) | |
- (void)applyDifference:(NSOrderedCollectionDifference<ObjectType> *)difference; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Append below to before NS_ASSUME_NONNULL_END of NSDictionary.h | |
@implementation NSDictionary (NSExtendedDictionary) | |
- (nullable id)objectForKeyedSubscript:(id)key | |
{ | |
return [self objectForKey: key]; | |
} | |
@end | |
@implementation NSMutableDictionary (NSExtendedMutableDictionary) | |
- (void) setObject: (nullable id)anObject forKeyedSubscript: (id)aKey | |
{ | |
[self setObject: anObject forKey: aKey]; | |
} | |
- (nullable id) objectForKeyedSubscript: (id)aKey | |
{ | |
return [self objectForKey: aKey]; | |
} | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <__config> | |
#include <type_traits> | |
#include <typeinfo> | |
#include <cstddef> | |
#include <cstdint> | |
#include <new> | |
#include <utility> | |
#include <functional> | |
#include <limits> | |
#include <iterator> | |
#include <__functional_base> | |
#include <iosfwd> | |
#include <tuple> | |
#include <stdexcept> | |
#include <cstring> | |
#if !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER) | |
# include <atomic> | |
#endif | |
#include <version> | |
_LIBCPP_PUSH_MACROS | |
#include <__undef_macros> | |
_LIBCPP_BEGIN_NAMESPACE_STD | |
_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR | |
__sp_mut& __get_sp_mut(const void*); | |
_LIBCPP_SAFE_STATIC static const std::size_t __sp_mut_count = 16; | |
_LIBCPP_SAFE_STATIC static __libcpp_mutex_t mut_back[__sp_mut_count] = | |
{ | |
_LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, | |
_LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, | |
_LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, | |
_LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER | |
}; | |
_LIBCPP_CONSTEXPR __sp_mut::__sp_mut(void* p) _NOEXCEPT | |
: __lx(p) | |
{ | |
} | |
void | |
__sp_mut::lock() _NOEXCEPT | |
{ | |
auto m = static_cast<__libcpp_mutex_t*>(__lx); | |
unsigned count = 0; | |
while (!__libcpp_mutex_trylock(m)) | |
{ | |
if (++count > 16) | |
{ | |
__libcpp_mutex_lock(m); | |
break; | |
} | |
__libcpp_thread_yield(); | |
} | |
} | |
void | |
__sp_mut::unlock() _NOEXCEPT | |
{ | |
__libcpp_mutex_unlock(static_cast<__libcpp_mutex_t*>(__lx)); | |
} | |
__sp_mut& | |
__get_sp_mut(const void* p) | |
{ | |
static __sp_mut muts[__sp_mut_count] | |
{ | |
&mut_back[ 0], &mut_back[ 1], &mut_back[ 2], &mut_back[ 3], | |
&mut_back[ 4], &mut_back[ 5], &mut_back[ 6], &mut_back[ 7], | |
&mut_back[ 8], &mut_back[ 9], &mut_back[10], &mut_back[11], | |
&mut_back[12], &mut_back[13], &mut_back[14], &mut_back[15] | |
}; | |
return muts[hash<const void*>()(p) & (__sp_mut_count-1)]; | |
} | |
_LIBCPP_END_NAMESPACE_STD | |
_LIBCPP_POP_MACROS | |
#if defined(_LIBCPP_HAS_PARALLEL_ALGORITHMS) && _LIBCPP_STD_VER >= 17 | |
# include <__pstl_memory> | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment