ruby-changes:53942
From: k0kubun <ko1@a...>
Date: Mon, 3 Dec 2018 21:00:32 +0900 (JST)
Subject: [ruby-changes:53942] k0kubun:r66162 (trunk): mjit_worker.c: undefine CC_PATH
k0kubun 2018-12-03 21:00:27 +0900 (Mon, 03 Dec 2018) New Revision: 66162 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66162 Log: mjit_worker.c: undefine CC_PATH because we mostly use cc_path now and the comment is obsolete (CC_PATH is now absolute path and the TODO is already resolved). mjit.c: use CC_COMMON_ARGS[0] directly Modified files: trunk/mjit.c trunk/mjit_worker.c Index: mjit_worker.c =================================================================== --- mjit_worker.c (revision 66161) +++ mjit_worker.c (revision 66162) @@ -249,10 +249,6 @@ static const char *const CC_COMMON_ARGS[ https://github.com/ruby/ruby/blob/trunk/mjit_worker.c#L249 NULL }; -/* GCC and CLANG executable paths. TODO: The paths should absolute - ones to prevent changing C compiler for security reasons. */ -#define CC_PATH CC_COMMON_ARGS[0] - static const char *const CC_DEBUG_ARGS[] = {MJIT_DEBUGFLAGS NULL}; static const char *const CC_OPTIMIZE_ARGS[] = {MJIT_OPTFLAGS NULL}; Index: mjit.c =================================================================== --- mjit.c (revision 66161) +++ mjit.c (revision 66162) @@ -632,15 +632,14 @@ mjit_init(struct mjit_options *opts) https://github.com/ruby/ruby/blob/trunk/mjit.c#L632 if (mjit_opts.max_cache_size < MIN_CACHE_SIZE) mjit_opts.max_cache_size = MIN_CACHE_SIZE; - verbose(2, "MJIT: CC defaults to %s", CC_PATH); - /* Initialize variables for compilation */ #ifdef _MSC_VER pch_status = PCH_SUCCESS; /* has prebuilt precompiled header */ #else pch_status = PCH_NOT_READY; #endif - cc_path = CC_PATH; + cc_path = CC_COMMON_ARGS[0]; + verbose(2, "MJIT: CC defaults to %s", cc_path); tmp_dir = system_tmpdir(); verbose(2, "MJIT: tmp_dir is %s", tmp_dir); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/