The reconstruction of the distribution function of runaway electrons (RE) in magnetically confined fusion plasmas gives insights on the runaway electron beam dynamics during plasma disruptions. In view of enabling a two-dimensional, energy-pitch reconstruction of the RE velocity space, in this work we present a calculation of the weight functions for the bremsstrahlung emission by the REs. The weight functions allow bridging the bremsstrahlung spectrum with the RE velocity space, as they tell the region of the velocity space that contributes to a particular spectral measurement. The results are applied to investigate the RE velocity-space sensitivity of the hard X-ray diagnostic installed at the Joint European Torus.