Bug 1867925 - Mark some storage-access-api tests as intermittent after wpt-sync....
[gecko.git] / build / win32 / dummy_libs.py
blob16947c6c846c2337ed29765ea3561ea5d8e20fec
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
8 from buildconfig import substs
11 def main(output, *other_libs):
12 output.close()
13 # ar doesn't like it when the file exists beforehand.
14 os.unlink(output.name)
15 libs = [output.name]
16 parent = os.path.dirname(output.name)
17 libs.extend(os.path.join(parent, l) for l in other_libs)
18 for lib in libs:
19 result = subprocess.run(
20 [substs["AR"]] + [f.replace("$@", lib) for f in substs["AR_FLAGS"]]
22 if result.returncode != 0:
23 return result.returncode
24 return 0