Commit 1e1c431c by Antonio Maiorano

Fix MacOS (darwin) Chromium build on LLVM 10

Chromium MacOS bots are at version 10.10, while the configs were compiled on 10.13. We now pass the version to the compiler when building LLVM, which modifies the config files to support the specified version. In this case, it simply undefines HAVE_FUTIMENS. Bug: b/152339534 Change-Id: I76d231660e6ee6f087bb67389a0a61abe4673740 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/46549Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarAntonio Maiorano <amaiorano@google.com>
parent 2a5111ff
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
/* #undef HAVE_FFI_H */ /* #undef HAVE_FFI_H */
/* Define to 1 if you have the `futimens' function. */ /* Define to 1 if you have the `futimens' function. */
#define HAVE_FUTIMENS 1 /* #undef HAVE_FUTIMENS */
/* Define to 1 if you have the `futimes' function. */ /* Define to 1 if you have the `futimes' function. */
#define HAVE_FUTIMES 1 #define HAVE_FUTIMES 1
......
...@@ -118,6 +118,8 @@ LLVM_CMAKE_OPTIONS = [ ...@@ -118,6 +118,8 @@ LLVM_CMAKE_OPTIONS = [
'-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON' '-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON'
] ]
# Used when building LLVM for darwin. Affects values set in the generated config files.
MIN_MACOS_VERSION = '10.10'
@contextlib.contextmanager @contextlib.contextmanager
def pushd(new_dir): def pushd(new_dir):
...@@ -210,6 +212,9 @@ def build_llvm(name, num_jobs): ...@@ -210,6 +212,9 @@ def build_llvm(name, num_jobs):
cmake_options = LLVM_CMAKE_OPTIONS + ['-DLLVM_TARGETS_TO_BUILD=' + cmake_options = LLVM_CMAKE_OPTIONS + ['-DLLVM_TARGETS_TO_BUILD=' +
';'.join(t for t in get_cmake_targets_to_build(name))] ';'.join(t for t in get_cmake_targets_to_build(name))]
if name == 'darwin':
cmake_options.append('-DCMAKE_OSX_DEPLOYMENT_TARGET={}'.format(MIN_MACOS_VERSION))
os.makedirs(LLVM_OBJS, exist_ok=True) os.makedirs(LLVM_OBJS, exist_ok=True)
run_subprocess(['cmake', host, LLVM_DIR] + run_subprocess(['cmake', host, LLVM_DIR] +
cmake_options, log_level=2, cwd=LLVM_OBJS) cmake_options, log_level=2, cwd=LLVM_OBJS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment