Bug 1653417 Part 1: Define a pref for specialized video layers on macOS. r=gfx-review...
[gecko.git] / build / win32 / dummy_libs.py
blob93faeef429b3e8da32456a00fa36707a1c7acf62
1 # This Source Code Form is subject to the terms of the Mozilla Public
2 # License, v. 2.0. If a copy of the MPL was not distributed with this
3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 import os
6 import subprocess
7 from buildconfig import substs
10 def main(output, *other_libs):
11 output.close()
12 # ar doesn't like it when the file exists beforehand.
13 os.unlink(output.name)
14 libs = [output.name]
15 parent = os.path.dirname(output.name)
16 libs.extend(os.path.join(parent, l) for l in other_libs)
17 for lib in libs:
18 result = subprocess.run(
19 [substs["AR"]] + [f.replace("$@", lib) for f in substs["AR_FLAGS"]]
21 if result.returncode != 0:
22 return result.returncode
23 return 0