diff options
| author | ruki <[email protected]> | 2025-01-13 08:51:03 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-01-13 08:51:03 +0800 |
| commit | eb5e21b16f5f3d27fe7a8a432b3434502aa682de (patch) | |
| tree | 452d8eff2e9f069edf88832de91dca566c69169f | |
| parent | 229373a8e84b72e0a5a6c768c76ad29c040355f0 (diff) | |
| parent | 9be0e3d31e0dd77a6e0f91268c62ecb522e6f92e (diff) | |
Merge pull request #6068 from therloux/dev
Add newline at the end of file snippets
| -rw-r--r-- | xmake/modules/detect/tools/armclang/has_flags.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/cl/has_flags.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/clang_cl/has_flags.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/cosmocc/has_flags.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_cl.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_emar.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_lib.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_link.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_strip.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/gcc/has_flags.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/link/has_flags.lua | 4 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/nvcc/has_flags.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/sdcc/has_flags.lua | 2 |
13 files changed, 14 insertions, 14 deletions
diff --git a/xmake/modules/detect/tools/armclang/has_flags.lua b/xmake/modules/detect/tools/armclang/has_flags.lua index 965644f2a..d1a2fa752 100644 --- a/xmake/modules/detect/tools/armclang/has_flags.lua +++ b/xmake/modules/detect/tools/armclang/has_flags.lua @@ -90,7 +90,7 @@ function _check_try_running(flags, opt, islinker) -- make an stub source file local sourcefile = path.join(os.tmpdir(), "detect", "armclang_has_flags" .. _get_extension(opt)) if not os.isfile(sourcefile) then - io.writefile(sourcefile, "int main(int argc, char** argv)\n{return 0;}") + io.writefile(sourcefile, "int main(int argc, char** argv)\n{return 0;}\n") end -- check flags for linker diff --git a/xmake/modules/detect/tools/cl/has_flags.lua b/xmake/modules/detect/tools/cl/has_flags.lua index 8bce7a83e..378c16a5b 100644 --- a/xmake/modules/detect/tools/cl/has_flags.lua +++ b/xmake/modules/detect/tools/cl/has_flags.lua @@ -64,7 +64,7 @@ end function _check_try_running(flags, opt) -- make an stub source file - local snippet = opt.snippet or "int main(int argc, char** argv)\n{return 0;}" + local snippet = opt.snippet or "int main(int argc, char** argv)\n{return 0;}\n" local sourcefile = os.tmpfile("cl_has_flags:" .. snippet) .. _get_extension(opt) if not os.isfile(sourcefile) then io.writefile(sourcefile, snippet) diff --git a/xmake/modules/detect/tools/clang_cl/has_flags.lua b/xmake/modules/detect/tools/clang_cl/has_flags.lua index 704a30f1a..3f173dea4 100644 --- a/xmake/modules/detect/tools/clang_cl/has_flags.lua +++ b/xmake/modules/detect/tools/clang_cl/has_flags.lua @@ -74,7 +74,7 @@ function _check_try_running(flags, opt) -- make an stub source file local sourcefile = path.join(os.tmpdir(), "detect", "clang_cl_has_flags" .. extension) if not os.isfile(sourcefile) then - io.writefile(sourcefile, "int main(int argc, char** argv)\n{return 0;}") + io.writefile(sourcefile, "int main(int argc, char** argv)\n{return 0;}\n") end -- check flags for compiler diff --git a/xmake/modules/detect/tools/cosmocc/has_flags.lua b/xmake/modules/detect/tools/cosmocc/has_flags.lua index e58be748b..df8690652 100644 --- a/xmake/modules/detect/tools/cosmocc/has_flags.lua +++ b/xmake/modules/detect/tools/cosmocc/has_flags.lua @@ -92,7 +92,7 @@ end function _check_try_running(flags, opt, islinker) -- make an stub source file - local snippet = opt.snippet or "int main(int argc, char** argv)\n{return 0;}" + local snippet = opt.snippet or "int main(int argc, char** argv)\n{return 0;}\n" local sourcefile = os.tmpfile("cosmocc_has_flags:" .. snippet) .. _get_extension(opt) if not os.isfile(sourcefile) then io.writefile(sourcefile, snippet) diff --git a/xmake/modules/detect/tools/find_cl.lua b/xmake/modules/detect/tools/find_cl.lua index 9894a79d9..4f0fb8f77 100644 --- a/xmake/modules/detect/tools/find_cl.lua +++ b/xmake/modules/detect/tools/find_cl.lua @@ -44,7 +44,7 @@ function main(opt) -- @see https://github.com/xmake-io/xmake/issues/3057 local objectfile = os.tmpfile() .. ".obj" local sourcefile = os.tmpfile() .. ".c" - io.writefile(sourcefile, "int main(int argc, char** argv)\n{return 0;}") + io.writefile(sourcefile, "int main(int argc, char** argv)\n{return 0;}\n") os.runv(program, {"-c", "-Fo" .. objectfile, sourcefile}, {envs = opt.envs}) os.rm(objectfile) os.rm(sourcefile) diff --git a/xmake/modules/detect/tools/find_emar.lua b/xmake/modules/detect/tools/find_emar.lua index 0a6ba4f7c..407113e36 100644 --- a/xmake/modules/detect/tools/find_emar.lua +++ b/xmake/modules/detect/tools/find_emar.lua @@ -60,7 +60,7 @@ function main(opt) local libraryfile = os.tmpfile() .. ".a" local objectfile = os.tmpfile() .. ".o" local sourcefile = os.tmpfile() .. ".c" - io.writefile(sourcefile, "int test(void)\n{return 0;}") + io.writefile(sourcefile, "int test(void)\n{return 0;}\n") -- compile it os.runv(emcc.program, {"-c", "-o" .. objectfile, sourcefile}, {envs = opt.envs}) diff --git a/xmake/modules/detect/tools/find_lib.lua b/xmake/modules/detect/tools/find_lib.lua index ba3f7e30d..13c0f7bb6 100644 --- a/xmake/modules/detect/tools/find_lib.lua +++ b/xmake/modules/detect/tools/find_lib.lua @@ -48,7 +48,7 @@ function main(opt) local libraryfile = os.tmpfile() .. ".lib" local objectfile = os.tmpfile() .. ".obj" local sourcefile = os.tmpfile() .. ".c" - io.writefile(sourcefile, "int test(void)\n{return 0;}") + io.writefile(sourcefile, "int test(void)\n{return 0;}\n") -- check it local cl = assert(find_tool("cl", {envs = opt.envs})) diff --git a/xmake/modules/detect/tools/find_link.lua b/xmake/modules/detect/tools/find_link.lua index c79b2e52a..103242d9b 100644 --- a/xmake/modules/detect/tools/find_link.lua +++ b/xmake/modules/detect/tools/find_link.lua @@ -60,7 +60,7 @@ function main(opt) local sourcefile = os.tmpfile() .. ".c" -- compile sourcefile first - io.writefile(sourcefile, "int main(int argc, char** argv)\n{return 0;}") + io.writefile(sourcefile, "int main(int argc, char** argv)\n{return 0;}\n") os.runv(cl.program, {"-c", "-Fo" .. objectfile, sourcefile}, {envs = opt.envs}) -- do link diff --git a/xmake/modules/detect/tools/find_strip.lua b/xmake/modules/detect/tools/find_strip.lua index 315eae2df..3b4876559 100644 --- a/xmake/modules/detect/tools/find_strip.lua +++ b/xmake/modules/detect/tools/find_strip.lua @@ -28,7 +28,7 @@ function _check_strip_of_xcode(program) -- make an stub source file local objectfile = os.tmpfile() .. ".o" local sourcefile = os.tmpfile() .. ".c" - io.writefile(sourcefile, "int test(void)\n{return 0;}") + io.writefile(sourcefile, "int test(void)\n{return 0;}\n") -- compile it compiler.compile(sourcefile, objectfile) diff --git a/xmake/modules/detect/tools/gcc/has_flags.lua b/xmake/modules/detect/tools/gcc/has_flags.lua index 99ceb0643..181cef04e 100644 --- a/xmake/modules/detect/tools/gcc/has_flags.lua +++ b/xmake/modules/detect/tools/gcc/has_flags.lua @@ -89,7 +89,7 @@ end function _check_try_running(flags, opt, islinker) -- make an stub source file - local snippet = opt.snippet or "int main(int argc, char** argv)\n{return 0;}" + local snippet = opt.snippet or "int main(int argc, char** argv)\n{return 0;}\n" local sourcefile = os.tmpfile("gcc_has_flags:" .. snippet) .. _get_extension(opt) if not os.isfile(sourcefile) then io.writefile(sourcefile, snippet) diff --git a/xmake/modules/detect/tools/link/has_flags.lua b/xmake/modules/detect/tools/link/has_flags.lua index b7d93fe34..6b0cf48f8 100644 --- a/xmake/modules/detect/tools/link/has_flags.lua +++ b/xmake/modules/detect/tools/link/has_flags.lua @@ -63,9 +63,9 @@ function _check_try_running(flags, opt) local sourcefile = path.join(os.tmpdir(), "detect", (winmain and "winmain_" or "") .. "link_has_flags.c") if not os.isfile(sourcefile) then if winmain then - io.writefile(sourcefile, "int WinMain(void* instance, void* previnst, char** argv, int argc)\n{return 0;}") + io.writefile(sourcefile, "int WinMain(void* instance, void* previnst, char** argv, int argc)\n{return 0;}\n") else - io.writefile(sourcefile, "int main(int argc, char** argv)\n{return 0;}") + io.writefile(sourcefile, "int main(int argc, char** argv)\n{return 0;}\n") end end diff --git a/xmake/modules/detect/tools/nvcc/has_flags.lua b/xmake/modules/detect/tools/nvcc/has_flags.lua index c75f6e114..ff1c47b42 100644 --- a/xmake/modules/detect/tools/nvcc/has_flags.lua +++ b/xmake/modules/detect/tools/nvcc/has_flags.lua @@ -101,7 +101,7 @@ end function _check_try_running(flags, opt, islinker) -- make an stub source file - local snippet = opt.snippet or "int main(int argc, char** argv)\n{return 0;}" + local snippet = opt.snippet or "int main(int argc, char** argv)\n{return 0;}\n" local sourcefile = os.tmpfile("nvcc_has_flags:" .. snippet) .. ".cu" if not os.isfile(sourcefile) then io.writefile(sourcefile, snippet) diff --git a/xmake/modules/detect/tools/sdcc/has_flags.lua b/xmake/modules/detect/tools/sdcc/has_flags.lua index b911124ff..18c0eb3ae 100644 --- a/xmake/modules/detect/tools/sdcc/has_flags.lua +++ b/xmake/modules/detect/tools/sdcc/has_flags.lua @@ -88,7 +88,7 @@ function _check_try_running(flags, opt, islinker) -- make an stub source file local sourcefile = path.join(os.tmpdir(), "detect", "sdcc_has_flags" .. extension) if not os.isfile(sourcefile) then - io.writefile(sourcefile, "int main(int argc, char** argv)\n{return 0;}") + io.writefile(sourcefile, "int main(int argc, char** argv)\n{return 0;}\n") end -- check flags for linker |
