Skip to content

Commit 2fb68e5

Browse files
committed
do not create symlink if there is already something.
1 parent 9530b0f commit 2fb68e5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

linker_interceptor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ def fix_compile_commands():
4040
with open("compile_commands.json", 'w') as f:
4141
f.write(res)
4242

43-
os.symlink("build/compile_commands.json", "../compile_commands.json")
43+
if not os.path.isfile("../compile_commands.json"):
44+
os.symlink("build/compile_commands.json", "../compile_commands.json")
4445

4546
def process_args(args):
4647
global out_args, shareds, search, is_linking_qemu

0 commit comments

Comments
 (0)