From aa4c9002e65755cbc8e92dac99e9cfd47ebb1801 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 12 Sep 2019 17:54:50 +0300 Subject: [PATCH] waifulib: msvcfix: add tool to fix MSVC PDB race condition --- scripts/waifulib/msvcfix.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 scripts/waifulib/msvcfix.py diff --git a/scripts/waifulib/msvcfix.py b/scripts/waifulib/msvcfix.py new file mode 100644 index 0000000..0f69fa9 --- /dev/null +++ b/scripts/waifulib/msvcfix.py @@ -0,0 +1,10 @@ +#!/usr/bin/env +from waflib.TaskGen import feature, after_method + +@feature('c', 'cxx') +@after_method('apply_flags_msvc') +def make_pdb_unique(self): + for t in self.compiled_tasks: + pdb_unique_cflag = '/Fd' + t.outputs[0].change_ext('.pdb').abspath() + t.env.append_value('CFLAGS', pdb_unique_cflag) + t.env.append_value('CXXFLAGS', pdb_unique_cflag)