Commit Graph

3 Commits (2ae69114a11c6a80a58abc6984fde8851ee8fe40)

Author SHA1 Message Date
Naïm Favier 2ae69114a1
makeWrapper: implement --inherit-argv0 2 years ago
Naïm Favier 62245943aa
makeWrapper,makeBinaryWrapper: introduce explicitly named functions 2 years ago
Naïm Favier 0d6bcb513b
makeBinaryWrapper: move into its own folder 2 years ago
Naïm Favier d4aa650608
makeBinaryWrapper: really unset NIX_CFLAGS 2 years ago
Naïm Favier 42a4c05dd0
makeBinaryWrapper: add -Wno-overlength-strings 2 years ago
Naïm Favier f8cc8ff575
makeBinaryWrapper: unset NIX_CFLAGS 2 years ago
Naïm Favier ffdf9681ab
makeBinaryWrapper: create destination directory 2 years ago
Jacek Galowicz d5e028a441 make-binary-wrapper: Make CC substitution safer 2 years ago
Jacek Galowicz 87fcb7b79e make-binary-wrapper: Add -euo pipefail to bash script 2 years ago
Jacek Galowicz b7e00ed89e make-binary-wrapper: Add -Wall -Werror -Wpedantic 2 years ago
Jacek Galowicz 177f0a6eed make makeWrapper and makeBinaryWrapper drop-in-replaceable 2 years ago
Doron Behar 32d566e1b9 wrapProgramBinary -> binaryWrapProgram 2 years ago
Jacek Galowicz f3b16a6b5d Fix typo in make-binary-wrapper 2 years ago
Tobias Bergkvist 7cf1aa102a Separate out indentation responsibility to indent4 in makeCWrapper using awk. 2 years ago
Tobias Bergkvist 2b5a2d4a8e Switch to embedding input arguments instead of generated C code in binary. 2 years ago
Tobias Bergkvist 64da82731d Add new argument: --chdir DIR (alternative to --run "cd DIR" in makeWrapper) 3 years ago
Tobias Bergkvist a47286f0a0 Add argument --inherit-argv0 to replace use case `--argv0 '$0'`. Fix wrapProgramBinary by using this new argument 3 years ago
Tobias Bergkvist e3c94f3d6b Use cc instead of gcc in makeBinaryWrapper 3 years ago
Tobias Bergkvist a1e62262bc Replace concat3 with asprintf in set_env_prefix and set_env_suffix. 3 years ago
Tobias Bergkvist 3997e9de67 Switch from malloc to calloc in addFlags 3 years ago
Tobias Bergkvist 97d62a90f5 Switch from exit(1) to abort() in assert_success 3 years ago
Tobias Bergkvist 4e55d34535 Add assertValidEnvName and check that variable name is valid during code generation. Add assert_success, and assert that setenv/unsetenv succeeds to crash if they don't 3 years ago
Tobias Bergkvist 3a014be2f2 Assert that malloc does not return a NULL pointer for better error messages + to satisfy static analysis tools. 3 years ago
Tobias Bergkvist 1218b82bce Move assertExecutable from makeCWrapper to makeBinaryWrapper to ensure that makeCWrapper is a pure function 3 years ago
Doron Behar c310cb0d94 makeBinaryWrapper: add wrapProgramBinary (like wrapProgram) 3 years ago
Doron Behar a45c5db391 makeBinaryWrapper: Assert $1 is executable 3 years ago
Tobias Bergkvist adef70ce7c Specify uses_prefix, uses_suffix and uses_concat3 as local vars. Make sure errors in makeCWrapper are located next to the line with the issue. 3 years ago
Tobias Bergkvist 3df841bb99 Make error messages more consistent 3 years ago
Tobias Bergkvist d930fecc3c Return an #error macro if the wrong number of arguments are supplied 3 years ago
Tobias Bergkvist b62216a211 Fix shellcheck warnings. Use single quotes for printf format strings. Switch to strncpy in concat3. Use multiline strings to print C functions. Switch from if/elif to case. 3 years ago
Tobias Bergkvist b58c857bfb Switch to using strlen in concat3Fn. Make sure uses-variables are local to improve purity of makeCWrapper. Refactor 3 years ago
Tobias Bergkvist dcba4171d4 Add support for --add-flags, --prefix and --suffix 3 years ago
Tobias Bergkvist 1d64281401 Remove line at the bottom of make-binary-wrapper that executes makeBinaryWrapper "$@" 3 years ago
Tobias Bergkvist 8d2964a8e6 Rename make-c-wrapper.sh to make-binary-wrapper.sh. Refactor to match style of other setup-hooks. Add compilation step with gcc. Embed the entire generated source code into the binary for troubleshooting. 3 years ago