-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault_config.ini
115 lines (100 loc) · 10.4 KB
/
default_config.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
BUILD_NAME=required #ie findutils, should be the official name as we sometimes use this value to look for default libs etc
BUILD_FOLDER_NAME=[BUILD_NAME] #the folder under the base folder it will be built in
#if the var name starts with ENV_ and the value is 'env' then the var is set to the value of the environment variable with the name of the variable name without the leading ENV_
#you can set the base folder directly if desired note the path should be in the form x:/path/to/folder as this path form works both under msys and windows
ENV_WLB_BASE_FOLDER=env
BASE_FOLDER=[ENV_WLB_BASE_FOLDER]
SRC_FOLDER=[BASE_FOLDER]/[BUILD_FOLDER_NAME]
BUILD_AUX_FOLDER=[SRC_FOLDER]/build-aux
BUILD_AUX_SCRIPTS_DEFAULT = ( "ar-lib" "compile" "ld-link" "wrapper_helper.sh" )
BUILD_AUX_SCRIPTS_ADDL = ()
INSTALL_FOLDER_NAME=final
PREFER_STATIC_LINKING=1 #note this is only effecting the library searching and may requireother defines, make sure to change the VCPKG triplet var (VCPKG_TRIPLET) to not have static in it as well
INSTALL_FOLDER=[SRC_FOLDER]/[INSTALL_FOLDER_NAME]
FORCE_BUILD_ID=x86_64-MSYS2-mingw32 #there is ming64 but not everything defaults to that triplet support
CONFIG_CMD_DEFAULT=("--config-cache" "--prefix=[INSTALL_FOLDER]" "--build=[FORCE_BUILD_ID]")
CONFIG_CMD_ADDL=()# --disable-nls
CONFIG_CMD_GNULIB_ADDL=("--enable-threads=windows" "--disable-silent-rules")
CONFIG_ADDL_LIBS= "" # -lSomeLib
CONFIG_DEFAULT_WINDOWS_LIBS="-lBcrypt -lWs2_32 -lShell32 -luser32 -lAdvapi32 -lKernel32 -lWinmm"
CONFIG_BYPASS_FILESYSTEM_LIST_FAIL=1
CONFIG_GETHOSTNAME_FIX=1
BUILD_DEBUG=0 #build as much as possible in MSVS debug mode compat
BUILD_MSVC_RUNTIME_INFO_ADD_TO_C_AND_LDFLAGS=0 #add debug/static runtime (/MT /MD etc to CFLAGS and LDFLAGS), if this is enabled the BUILD_DEBUG and PREFER_STATIC_LINKING are used to determine what exactly. For most this is not needed, may be helpful if using with debugger.
BUILD_MSVC_CL_DEBUG_OPTS=/ZI /Zf /FS #it will also add things like /DEBUG by default, ZI=generate PDB, FS=sync PDB generation for when doing make -j X, Zf=speed up the synced PDB generation, not even with /FS it will get access errors with concurrent building. Our make command also falls back to non-concurrent building as a backup.
BUILD_MSVC_CL_NDEBUG_OPTS=/Os #optimize for size
BUILD_MSVC_IGNORE_WARNINGS=() #ie 4700, 4711, will turn into /wd4700 ...
BUILD_MSVC_NO_DEFAULT_LIB=none #if set to "full" will ignore all libs not the one we want can be set to "debug" to just set it to the non debug or debug lib (depending on if debugging or not)
BUILD_WINDOWS_COMPILE_WRAPPERS=0 #if you can't use the GNU_LIB_BUILD_AUX wrappers as it is a windows program calling the compiler (cmake or name for example) you can enable this to still get logging, that is all the wrapper does before passing all args through
BUILD_DEBUG_ADDL_CFLAGS="-DDEBUG" #non standard but several apps to use it by default
BUILD_MAKE_BIN="make" #default command to use for make, can be full path to alt-make
CONFIG_NO_TESTS=1
CONFIG_NO_PO=1
CONFIG_NO_DOCS=1
GIT_SETTINGS_DEFAULT=( "core.autocrlf false" "user.email [email protected]" "user.name YourNamee" "core.fileMode false" "core.eol lf" "diff.ignoreAllSpace true" "apply.ignoreWhitespace change" "apply.whitespace fix" )
GIT_SETTINGS_ADDL=() #
GIT_IGNORE_DEFAULT=("*.exe" "*.ilk" "*.obj" "*.log" "*.Plo" "*.pdb" "*.idb" "*.zip" "*.tmp" "*.o" ".deps" "*.a" "final" "proj_config.ini" "*~" "*confest*" "_configure" )
GIT_IGNORE_ADDL=()
GIT_PATCH_APPLY_DEFAULT_ARGS=("--whitespace=nowarn" "--ignore-space-change" "--ignore-whitespace")
GIT_STASH_STAGE_AROUND_PATCHES=1 # to make it easier to tell what code you have changed vs what code we patch/change with the build script we can try to stage all of the changes we make using git. This way any untracked changes are the changes you made. In general this works without error always on first builds. To re-apply patches though we have to do some stashing of changes in different ways to discard the old applied patch changes before applying them again. We try to stash user changes separately and backup everything to tmp files (see output for what tmp files for a specific run) so it should be hard to lose your changes. It is more likely a conflict of some sort will occur though so this can break. There are also a few scripts where we need to commit a fake commit to git to store some changes we made to get this to work. If you disable this then it will just apply patches without any staging, which may make it harder to see changes you made.
GIT_STASH_STAGE_DEBUG=0 #given the above is fragile this will output debug messages if it is breaking to help determine what went wrong
ADD_WIN_ARGV_LIB=1 #should windows expand wildcard command line args, most of hte time we want this, something like find -name "*.c" we don't want it on
GNU_LIBS_USED=1 #0 if this is not actually a gnu app, otherwise we throw an error if we cannot find the gnu dir
GNU_LIB_SOURCE_DIR=[BASE_FOLDER]/gnulib #if this folder exists we will set GNULIB_SRCDIR to it and it sohuld be used for sources
GNU_LIBS_BRANCH=master #leave blank to use whatever version the app checks out
GNU_LIBS_BUILD_AUX_ONLY_USED=0
#symlink gets us unistd and lstat, lstat gets us stat, stat gets us sys_stat and filename
GNU_LIBS_DEFAULT=( "sigpipe" "sigaction" "spawn-pipe" "strtok_r" "waitpid" "windows-stat-inodes" "windows-stat-timespec" "execute" "poll" "symlink" "symlinkat" "readlink" "readlinkat" "link" "fchmodat" "unlink" "unlinkat" "fsync" "open" )
BUNDLE_PATH=[BASE_FOLDER]/gnulib.bundle # if this file exists use it as a bootstrapping bundle when cloning
GNU_LIBS_ADDL=()
GNU_LIBS_EXCLUDE= ()
GNU_LIBS_USE_GNULIB_TOOL_PY=1
GNU_LIBS_AUTORECONF_WRAPPER=1 #the wrapper now mostly avoids using --force which bootstraps do by default to avoid overriding the build-aux scripts
GNU_LIBS_USE_GNULIB_TOOL_PY_ADDL_MK_FILES_FIX=()
GNU_LIBS_PATCHES_DEFAULT=( "NOOP_FOR_WINDOWS_CHOWN_CHMOD_GETUSER_GETGROUP" "GNULIB_TOOL_APPLY_PATCHES_BY_FILE" "FTS_MINOR_FIXES" "BUILD_AUX_HANDLE_DOT_A_LIBS" "FIX_SYSSTAT_TIMESPEC_DISABLE_BUG" "WIN_FSUSAGE_FIXES" "WINDOWS_SYMLINK_SUPPORT" "SPAWN_PIPE_FORK_FD_FIXES" "WINDOW_PATH_FIXES" "PHYSMEM_TEST_MAIN_RENAME" "WIN32_POLL_FIXES" "MSVC_PARAMETER_HANDLER_M4_MACRO_FIX" )
GNU_LIBS_PATCHES_ADDL=()
VCPKG_DIR=[BASE_FOLDER]/vcpkg
VCPKG_INSTALL_TARGET_BASEDIR=[BASE_FOLDER]/vc_pkgs
VCPKG_TRIPLET=x64-windows[STATIC_RELEASE_TRIPLET_AUTO]
VCPKG_BINARY_DIR=[VCPKG_DIR]/archive
VCPKG_BIN=[VCPKG_DIR]/vcpkg.exe
VCPKG_STRIP_TRIPLET=0 #can strip the triplet off vcpkg to make the install paths shorter but if you switch between debug/release static/not without removing this will fail off by default
LOG_DEBUG_WRAPPERS=1 #enable debug mode for build-aux wrappers, show input and output, essentially sets DEBUG_GNU_COMPILE_WRAPPER=1 DEBUG_GNU_LIB_WRAPPER=1
LOG_COLOR_HIGHLIGHT=1 #when using some of our command wrappers do minimal coloring of the output
LOG_ON_AT_INIT=1
LOG_OFF_AT_FINAL=1
LOG_IGNORE_CMDS_EXACT_DEFAULT= ( "LOGOFF" "trap - debug" "LOGON" "ourmain" "ex " "echo \"{*@Q}\" 1>&3" "\"\$@\"" )
LOG_IGNORE_CMDS_EXACT_ADDL=()
LOG_IGNORE_CMDS_REGEX_DEFAULT=( "IFS=' ' read" "^\\(\\(" )
LOG_IGNORE_CMDS_REGEX_ADDL=( )
LOG_FILE="[BASE_FOLDER]/[BUILD_FOLDER_NAME]-cmd.log"
LOG_MAKE_CMD_FILE="[BASE_FOLDER]/[BUILD_FOLDER_NAME]-make.log" #must call log_make to generate
LOG_CONFIG_ENV_FILE="[BASE_FOLDER]/[BUILD_FOLDER_NAME]-env.log"
LOG_CONFIGURE_FILE="[BASE_FOLDER]/[BUILD_FOLDER_NAME]-configure.log"
LOG_RAW_BUILD_FILE="[BASE_FOLDER]/[BUILD_FOLDER_NAME]-build.bat" #if used with the "log_raw_build" or "log_raw_build_full" all the actual commands output to cl.exe or lib.exe although need to add link.exe you can also use log_true_make_full to run all the commands up to true make and stop at that point
LOG_RAW_BUILD_FILE_POST_PROCESS=1 # This will call the dotnet bat_cleanup.csx script after generating the bat file. It fixes any msys only paths into windows compat paths, it will also try to extract out long repeating strings into bat variables. See the comments at the top of the file for more details., note not currently actually enabled.
LOG_EXPAND_VARS=0 #This is a safeish way to expand the variables in commands but it is pretty slow, also note expanding the command manually is not error proof, any bash vars declared local won't be avail, and if there is a global var with the same name it will appear instead. This is for the LOG_FILE file.
LOG_FILE_AUTOTAIL=0
LOG_IGNORE_REPEAT_LINES=1
STACKTRACE_ON_FAIL=1
EXPAND_FAILED_CMD_ON_STACKTRACE=1 #Note expanding the command manually is not error proof, any bash vars declared local won't be avail, and if there is a global var with the same name it will appear instead.
PRINT_VARS_AT_START=0
CMAKE_STYLE="" #enabling this will automatically set some vars in start_common
CMAKE_BUILD_DIR=[SRC_FOLDER]/winbuild
CMAKE_SRC_DIR=.
CMAKE_MSYS_DIR=[BASE_FOLDER]/cmake_msys
CMAKE_MSYS_BIN=[CMAKE_MSYS_DIR]/usr/bin/cmake.exe
CMAKE_MSYS_VER=cmake-3.26.4-1-x86_64.pkg.tar.zst
CMAKE_BEST_STYLE="msys" #don't change this per project use CMAKE_STYLE instead this is only what cmake-style is set to if it is set to best
#VALUES: best,vs,unix-msys,ninja,ninja-msys,nmake,nmake-launchers,msys
#Best is current recommendation
# Visual studio (vs) almost always works perfectly but we can't really log commands as it uses msbuild, all these other attempts are to get logging to properly work
# unix-msys works well uses gnu wrappers hrm actually the file extensions for binaries are missing (no .exe) would need to manually rename anyhting in the bin folder, but otherwise works
# unix works pretty well as long as we use the windows wrappers, only issue is it needs the cmake *.rsp files
# msys works well compact commands but some of the build args are being doubled up
# nmake-launchers basically works BUT names are nonsense wouldn't work for source, could maybe use export compile but still deosnt help for link commands
# note only unix, unix-msys(minus renames),msys is fully tested right now (outside of vs) so some others may not automatically build correctly
# There are some auto vars they are customized based on other options (or influenced by them) while you can't really override (without editing helpers_ini.sh) them you can change the places they are used in this INI
# STATIC_RELEASE_TRIPLET_AUTO - # if you have STATIC_RELEASE_TRIPLET_ADD it will contain -static-release (or the combos there of) depending on the other PREFER_STATIC_LINKING / BUILD_DEBUG
# CMAKE_BUILD_TARGET_AUTO - # Release without debug and Debug with BUILD_DEBUG
# CMAKE_BUILD_TYPE_AUTO - # MinSizeRel for Release, Debug for debug