| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
@p0, thanks for your suggestion to use ${CODEQL_DIST}/tools/${CODEQL_ARCH}/preload_tracer. |
Sorry, something went wrong.
|
Yes, that would be safe enough. |
Sorry, something went wrong.
The variable is called CODEQL_PLATFORM and should be available. Why do we need to prefix things with the preload_tracer; wouldn't the codeql/tools/osx64/runner be enough? |
Sorry, something went wrong.
Thanks. You're right. I've changed it to use that value. |
Sorry, something went wrong.
| codeqlDist, | ||
| "tools", | ||
| codeqlPlatform, | ||
| "preload_tracer" |
There was a problem hiding this comment.
@p0 Wouldn't it be better to use the runner instead. It is available for all platforms including windows so we simply populate an env variable like CODEQL_RUNNER for all platforms. The advantage is that things keep on working in case a user tries to run the CI job on various platforms (or copy pastes the "$CODEQL_PRELOAD_TRACER" ./build-command.sh command line into a linux job). This could lead to unexpected problems due to undefined or empty environment variables.
Sorry, something went wrong.
|
I've switched over to using the runner and outputting the env var on all platforms. I'm going to write some tests for this. |
Sorry, something went wrong.
| tracerConfig.env["CODEQL_DIST"], | ||
| "tools", | ||
| tracerConfig.env["CODEQL_PLATFORM"], | ||
| "runner" |
There was a problem hiding this comment.
On windows the binary is called runner.exe. I think it is fine to leave off the .exe extension on Windows, but you might want to add it just in case.
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks. I was just looking at this. May as well add on the extension.
I also note there are runner-linux, runner-win.exe, and runner-osx. They appear to maybe be duplicates of the non-suffixed versions. Should these be ignored?
Sorry, something went wrong.
There was a problem hiding this comment.
I think these are left-overs of the legacy tools.
Sorry, something went wrong.
|
I've added the CODEQL_RUNNER var to the unit tests, and added usages of it to some of the integration tests. Unfortunately the unit tests don't run on windows (I only just discovered this) and they don't pass either so enabling them will be a bit of work. So for windows we're relying on the integration tests to show that things are working, but that's probably fine. |
Sorry, something went wrong.
|
@aibaars or @adityasharad do you mind having another quick look over this and make sure I haven't done anything stupid since it was last reviewed? |
Sorry, something went wrong.
There was a problem hiding this comment.
Looks good to me.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
When building code on macos with SIP enabled it's necessary to prefix your build command with preload_tracer, so to make that easy we output a path to that executable in the env that you need to source. This means you should be able to run $CODEQL_PRELOAD_TRACER ./my-build-command.sh.
Merge / deployment checklist