Skip to content

Commit 87dc1b9

Browse files
authored
Migrate libFuzzer from svn to git (#7245)
* Migrate libFuzzer from svn to git Now that the llvm project has completed its migration to git, the svn checkouts are now failing. * Find protoc even if homebrew isn't in /usr/local
1 parent 497d08b commit 87dc1b9

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

Firestore/Example/FuzzTests/FuzzingResources/Serializer/Corpus/ConvertTextToBinary.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#!/bin/bash
1+
#!/bin/bash -l
22

3-
# Copyright 2018 Google
3+
# Copyright 2018 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -20,6 +20,12 @@
2020
# and SCRIPT_OUTPUT_FILE_0 are defined in the Run Script Build Phase of the
2121
# XCode build target Firestore_FuzzTests_iOS that executes this script. XCode
2222
# defines these environment variables and makes them available to the script.
23+
#
24+
# By default Xcode build phase scripts run in a stripped down environment that
25+
# does not include user modifications to the PATH that might come from .profile
26+
# or similar. The shebang line includes `bash -l` specifically to force the
27+
# shell to pick up the user profile. This allows `protoc` to be found even if
28+
# it isn't installed in /usr/local/bin.
2329

2430
if ! [ -x "$(command -v protoc)" ]; then
2531
echo "This scripts needs the protoc command to be on the PATH."

Firestore/Example/LibFuzzer.podspec

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2018 Google
1+
# Copyright 2018 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -32,14 +32,16 @@ Pod::Spec.new do |s|
3232
s.osx.deployment_target = '10.12'
3333
s.tvos.deployment_target = '10.0'
3434

35-
# Check out only libFuzzer folder.
3635
s.source = {
37-
:svn => 'https://llvm.org/svn/llvm-project/compiler-rt/trunk/lib/fuzzer'
36+
:git => 'https://github.com/llvm/llvm-project.git'
3837
}
3938

40-
# Add all source files, except for the FuzzerMain.cpp.
41-
s.source_files = '*.{h,cpp,def}'
42-
s.exclude_files = 'FuzzerMain.cpp'
39+
# The fuzzer is self-contained so only add its source files.
40+
s.source_files = 'compiler-rt/lib/fuzzer/*.{h,cpp,def}'
41+
42+
# We run fuzz tests via FSTFuzzTestsPrincipal, so avoid linking a `main`
43+
# function.
44+
s.exclude_files = 'compiler-rt/lib/fuzzer/FuzzerMain.cpp'
4345

4446
s.library = 'c++'
4547

0 commit comments

Comments
 (0)