|
1 | | -/* nob - v2.0.1 - Public Domain - https://github.com/tsoding/nob.h |
| 1 | +/* nob - v2.1.0 - Public Domain - https://github.com/tsoding/nob.h |
2 | 2 |
|
3 | 3 | This library is the next generation of the [NoBuild](https://github.com/tsoding/nobuild) idea. |
4 | 4 |
|
@@ -693,24 +693,22 @@ NOBDEF char *nob_temp_running_executable_path(void); |
693 | 693 | // TODO: Maybe instead NOB_REBUILD_URSELF macro, the Go Rebuild Urself™ Technology should use the |
694 | 694 | // user defined nob_cc_* macros instead? |
695 | 695 | #ifndef NOB_REBUILD_URSELF |
696 | | -# if defined(_WIN32) |
697 | | -# if defined(__GNUC__) |
698 | | -# if defined(__cplusplus) |
699 | | -# define NOB_REBUILD_URSELF(binary_path, source_path) "gcc", "-x", "c++", "-o", binary_path, source_path |
700 | | -# else |
701 | | -# define NOB_REBUILD_URSELF(binary_path, source_path) "gcc", "-x", "c", "-o", binary_path, source_path |
702 | | -# endif |
703 | | -# elif defined(__clang__) |
704 | | -# if defined(__cplusplus) |
705 | | -# define NOB_REBUILD_URSELF(binary_path, source_path) "clang", "-x", "c++", "-o", binary_path, source_path |
706 | | -# else |
707 | | -# define NOB_REBUILD_URSELF(binary_path, source_path) "clang", "-x", "c", "-o", binary_path, source_path |
708 | | -# endif |
709 | | -# elif defined(_MSC_VER) |
710 | | -# define NOB_REBUILD_URSELF(binary_path, source_path) "cl.exe", nob_temp_sprintf("/Fe:%s", (binary_path)), source_path |
711 | | -# elif defined(__TINYC__) |
712 | | -# define NOB_REBUILD_URSELF(binary_path, source_path) "tcc", "-o", binary_path, source_path |
| 696 | +# if defined(_MSC_VER) |
| 697 | +# define NOB_REBUILD_URSELF(binary_path, source_path) "cl.exe", nob_temp_sprintf("/Fe:%s", (binary_path)), source_path |
| 698 | +# elif defined(__clang__) |
| 699 | +# if defined(__cplusplus) |
| 700 | +# define NOB_REBUILD_URSELF(binary_path, source_path) "clang", "-x", "c++", "-o", binary_path, source_path |
| 701 | +# else |
| 702 | +# define NOB_REBUILD_URSELF(binary_path, source_path) "clang", "-x", "c", "-o", binary_path, source_path |
| 703 | +# endif |
| 704 | +# elif defined(__GNUC__) |
| 705 | +# if defined(__cplusplus) |
| 706 | +# define NOB_REBUILD_URSELF(binary_path, source_path) "gcc", "-x", "c++", "-o", binary_path, source_path |
| 707 | +# else |
| 708 | +# define NOB_REBUILD_URSELF(binary_path, source_path) "gcc", "-x", "c", "-o", binary_path, source_path |
713 | 709 | # endif |
| 710 | +# elif defined(__TINYC__) |
| 711 | +# define NOB_REBUILD_URSELF(binary_path, source_path) "tcc", "-o", binary_path, source_path |
714 | 712 | # else |
715 | 713 | # if defined(__cplusplus) |
716 | 714 | # define NOB_REBUILD_URSELF(binary_path, source_path) "cc", "-x", "c++", "-o", binary_path, source_path |
@@ -2568,7 +2566,10 @@ NOBDEF char *nob_temp_running_executable_path(void) |
2568 | 2566 | /* |
2569 | 2567 | Revision history: |
2570 | 2568 |
|
2571 | | - 2.0.1+ ( ) Fix C++ support (by @rexim) |
| 2569 | + 2.1.0 ( ) Improve C++ support (by @rexim) |
| 2570 | + - Fix various C++ compilers warnings and complains throughout the code. |
| 2571 | + - Reimplement nob_cmd_append() without taking a pointer to temporary array (some C++ compilers don't like that) |
| 2572 | + - Make default NOB_REBUILD_URSELF() try to recompile with C++ if __cplusplus macro is defined |
2572 | 2573 | 2.0.1 (2026-01-07) Fix Walk_Entry naming (by @Sinha-Ujjawal) |
2573 | 2574 | Using single String Builder in nob__walk_dir_opt_impl (by @Sinha-Ujjawal) |
2574 | 2575 | Add tcc to nob_cc_*() and NOB_REBUILD_URSELF() macros (by @vylsaz) |
|
0 commit comments