Know that you can use
M-x compile to compile from within Emacs.
If you do that then, in your compilation output buffer, use
C-h m to see information about the mode.
For example, it might tell you that the mode is
compilation-mode and that
C-c C-k is bound to command
kill-compilation. Clicking that command name tells you:
Kill the process made by the M-x compile or M-x grep commands.
Similarly, if you are in
compilation-minor-mode, where you learn that
kill-compilation is bound to
K, as well as to
If you use library
help-fns+.el then you can use
C-h M-k followed by a keymap name (e.g.
compilation-minor-mode-map), to see all of the keys bound by that keymap.
So at least if you launch your compilation from within Emacs you can kill it using