Fix iverilog-vpi on Windows to handle more than one source file (issue #602)
Use the string containing the current source file path to derive the
object file name, not the string containing the space-separated list
of source files.
(thanks to DavidC-75 for pointing out the error)
(cherry picked from commit 7dcde37475)
This commit is contained in:
parent
1f4e65ee08
commit
38ab5f9b2c
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2015-2022 Martin Whitaker
|
||||
* Copyright (c) 2002 Gus Baldauf (gus@picturel.com)
|
||||
* Copyright (c) 2015 Martin Whitaker
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
* and/or modify it in source code form under the terms of the GNU
|
||||
|
|
@ -564,10 +564,10 @@ static void compile(char *pSource, char *pFlags, char **pObject, int *compile_er
|
|||
assignn(&src, ptr1, len);
|
||||
|
||||
/* Build the object file name */
|
||||
ostart = strrchr(ptr1, '/');
|
||||
if (ostart == NULL) ostart = ptr1;
|
||||
ostart = strrchr(src, '/');
|
||||
if (ostart == NULL) ostart = src;
|
||||
else ostart += 1;
|
||||
olen = strrchr(ptr1, '.') - ostart;
|
||||
olen = strrchr(ostart, '.') - ostart;
|
||||
assignn(&obj, ostart, olen);
|
||||
append(&obj, ".o");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue