mirror of
https://github.com/QB64-Phoenix-Edition/QB64pe.git
synced 2024-09-07 15:20:18 +00:00
Clean up nm commands
This commit is contained in:
parent
ed0b6b12a5
commit
4086cda00d
2 changed files with 12 additions and 8 deletions
|
@ -12577,7 +12577,7 @@ END IF
|
||||||
'Clear nm output from previous runs
|
'Clear nm output from previous runs
|
||||||
FOR x = 1 TO ResolveStaticFunctions
|
FOR x = 1 TO ResolveStaticFunctions
|
||||||
IF LEN(ResolveStaticFunction_File(x)) THEN
|
IF LEN(ResolveStaticFunction_File(x)) THEN
|
||||||
s$ = tmpdir$ + "nm_output_" + StrReplace$(StrReplace$(ResolveStaticFunction_File(x), pathsep$, "."), ":", ".") + ".txt"
|
s$ = MakeNMOutputFilename$(ResolveStaticFunction_File(x))
|
||||||
IF _FILEEXISTS(s$) THEN KILL s$
|
IF _FILEEXISTS(s$) THEN KILL s$
|
||||||
END IF
|
END IF
|
||||||
NEXT x
|
NEXT x
|
||||||
|
@ -12588,12 +12588,12 @@ IF os$ = "WIN" THEN
|
||||||
|
|
||||||
'resolve static function definitions and add to global.txt
|
'resolve static function definitions and add to global.txt
|
||||||
FOR x = 1 TO ResolveStaticFunctions
|
FOR x = 1 TO ResolveStaticFunctions
|
||||||
nm_output_file$ = tmpdir$ + "nm_output_" + StrReplace$(StrReplace$(ResolveStaticFunction_File(x), pathsep$, "."), ":", ".") + ".txt"
|
nm_output_file$ = MakeNMOutputFilename$(ResolveStaticFunction_File(x))
|
||||||
IF LEN(ResolveStaticFunction_File(x)) THEN
|
IF LEN(ResolveStaticFunction_File(x)) THEN
|
||||||
|
|
||||||
n = 0
|
n = 0
|
||||||
IF NOT _FILEEXISTS(nm_output_file$) THEN
|
IF NOT _FILEEXISTS(nm_output_file$) THEN
|
||||||
SHELL _HIDE "cmd /c internal\c\c_compiler\bin\nm.exe " + CHR$(34) + ResolveStaticFunction_File(x) + CHR$(34) + " --demangle -g >" + CHR$(34) + nm_output_file$ + CHR$(34)
|
SHELL _HIDE "cmd /c internal\c\c_compiler\bin\nm.exe " + AddQuotes$(ResolveStaticFunction_File(x)) + " --demangle -g >" + AddQuotes$(nm_output_file$)
|
||||||
END IF
|
END IF
|
||||||
fh = FREEFILE
|
fh = FREEFILE
|
||||||
s$ = " " + ResolveStaticFunction_Name(x) + "("
|
s$ = " " + ResolveStaticFunction_Name(x) + "("
|
||||||
|
@ -12650,7 +12650,7 @@ IF os$ = "WIN" THEN
|
||||||
|
|
||||||
IF n = 0 THEN 'a C++ dynamic object library?
|
IF n = 0 THEN 'a C++ dynamic object library?
|
||||||
IF NOT _FILEEXISTS(nm_output_file$) THEN
|
IF NOT _FILEEXISTS(nm_output_file$) THEN
|
||||||
SHELL _HIDE "cmd /c internal\c\c_compiler\bin\nm.exe " + CHR$(34) + ResolveStaticFunction_File(x) + CHR$(34) + " -D --demangle -g >" + CHR$(34) + nm_output_file$ + CHR$(34)
|
SHELL _HIDE "cmd /c internal\c\c_compiler\bin\nm.exe " + AddQuotes$(ResolveStaticFunction_File(x)) + " -D --demangle -g >" + AddQuotes$(nm_output_file$)
|
||||||
END IF
|
END IF
|
||||||
fh = FREEFILE
|
fh = FREEFILE
|
||||||
s$ = " " + ResolveStaticFunction_Name(x) + "("
|
s$ = " " + ResolveStaticFunction_Name(x) + "("
|
||||||
|
@ -12745,13 +12745,13 @@ IF os$ = "LNX" THEN
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
FOR x = 1 TO ResolveStaticFunctions
|
FOR x = 1 TO ResolveStaticFunctions
|
||||||
nm_output_file$ = tmpdir$ + "nm_output_" + StrReplace$(StrReplace$(ResolveStaticFunction_File(x), pathsep$, "."), ":", ".") + ".txt"
|
nm_output_file$ = MakeNMOutputFilename$(ResolveStaticFunction_File(x))
|
||||||
IF LEN(ResolveStaticFunction_File(x)) THEN
|
IF LEN(ResolveStaticFunction_File(x)) THEN
|
||||||
|
|
||||||
n = 0
|
n = 0
|
||||||
IF NOT _FILEEXISTS(nm_output_file$) THEN
|
IF NOT _FILEEXISTS(nm_output_file$) THEN
|
||||||
IF MacOSX = 0 THEN SHELL _HIDE "nm " + CHR$(34) + ResolveStaticFunction_File(x) + CHR$(34) + " --demangle -g >" + CHR$(34) + nm_output_file$ + CHR$(34) + " 2>" + CHR$(34) + tmpdir$ + "nm_error.txt" + CHR$(34)
|
IF MacOSX = 0 THEN SHELL _HIDE "nm " + AddQuotes$(ResolveStaticFunction_File(x)) + " --demangle -g >" + AddQuotes$(nm_output_file$) + " 2>" + AddQuotes$(tmpdir$ + "nm_error.txt")
|
||||||
IF MacOSX THEN SHELL _HIDE "nm " + CHR$(34) + ResolveStaticFunction_File(x) + CHR$(34) + " >" + CHR$(34) + nm_output_file$ + CHR$(34) + " 2>" + CHR$(34) + tmpdir$ + "nm_error.txt" + CHR$(34)
|
IF MacOSX THEN SHELL _HIDE "nm " + AddQuotes$(ResolveStaticFunction_File(x)) + " >" + AddQuotes$(nm_output_file$) + " 2>" + AddQuotes$(tmpdir$ + "nm_error.txt")
|
||||||
END IF
|
END IF
|
||||||
|
|
||||||
IF MacOSX = 0 THEN 'C++ name demangling not supported in MacOSX
|
IF MacOSX = 0 THEN 'C++ name demangling not supported in MacOSX
|
||||||
|
@ -12813,7 +12813,7 @@ IF os$ = "LNX" THEN
|
||||||
IF n = 0 THEN 'a C++ dynamic object library?
|
IF n = 0 THEN 'a C++ dynamic object library?
|
||||||
IF MacOSX THEN GOTO macosx_libfind_failed
|
IF MacOSX THEN GOTO macosx_libfind_failed
|
||||||
IF NOT _FILEEXISTS(nm_output_file$) THEN
|
IF NOT _FILEEXISTS(nm_output_file$) THEN
|
||||||
SHELL _HIDE "nm " + CHR$(34) + ResolveStaticFunction_File(x) + CHR$(34) + " -D --demangle -g >" + CHR$(34) + nm_output_file$ + CHR$(34) + " 2>" + CHR$(34) + tmpdir$ + "nm_error.txt" + CHR$(34)
|
SHELL _HIDE "nm " + AddQuotes$(ResolveStaticFunction_File(x)) + " -D --demangle -g >" + AddQuotes$(nm_output_file$) + " 2>" + AddQuotes$(tmpdir$ + "nm_error.txt")
|
||||||
END IF
|
END IF
|
||||||
fh = FREEFILE
|
fh = FREEFILE
|
||||||
s$ = " " + ResolveStaticFunction_Name(x) + "("
|
s$ = " " + ResolveStaticFunction_Name(x) + "("
|
||||||
|
|
|
@ -26,3 +26,7 @@ FUNCTION GetMakeExecutable$ ()
|
||||||
GetMakeExecutable$ = "make"
|
GetMakeExecutable$ = "make"
|
||||||
END IF
|
END IF
|
||||||
END FUNCTION
|
END FUNCTION
|
||||||
|
|
||||||
|
FUNCTION MakeNMOutputFilename$ (libfile AS STRING)
|
||||||
|
MakeNMOutputFilename$ = tmpdir$ + "nm_output_" + StrReplace$(StrReplace$(libfile, pathsep$, "."), ":", ".") + ".txt"
|
||||||
|
END FUNCTION
|
||||||
|
|
Loading…
Reference in a new issue